<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: node-menunav   node-menunav.js  (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
	<link rel="stylesheet" type="text/css" href="assets/api.css" />

    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
        <h3>node-menunav&nbsp; <span class="subtitle">3.3.0</span></h3>
        <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> 
            &gt; <a href="./module_node-menunav.html" title="node-menunav">node-menunav</a>
                
                 &gt; node-menunav.js (source view) 
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <div id="srcout">
                        <style>
                            #doc3 .classopts { display:none; }
                        </style>
                        <div class="highlight"><pre><span class="cm">/**</span>
<span class="cm">* &lt;p&gt;The MenuNav Node Plugin makes it easy to transform existing list-based </span>
<span class="cm">* markup into traditional, drop down navigational menus that are both accessible </span>
<span class="cm">* and easy to customize, and only require a small set of dependencies.&lt;/p&gt;</span>
<span class="cm">* </span>
<span class="cm">* </span>
<span class="cm">* &lt;p&gt;To use the MenuNav Node Plugin, simply pass a reference to the plugin to a </span>
<span class="cm">* Node instance&#39;s &lt;code&gt;plug&lt;/code&gt; method.&lt;/p&gt;</span>
<span class="cm">* </span>
<span class="cm">* &lt;p&gt;</span>
<span class="cm">* &lt;code&gt;</span>
<span class="cm">* &amp;#60;script type=&quot;text/javascript&quot;&amp;#62; &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 		//	Call the &quot;use&quot; method, passing in &quot;node-menunav&quot;.  This will &lt;br&gt;</span>
<span class="cm">* 		//	load the script and CSS for the MenuNav Node Plugin and all of &lt;br&gt;</span>
<span class="cm">* 		//	the required dependencies. &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 		YUI().use(&quot;node-menunav&quot;, function(Y) { &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 			//	Use the &quot;contentready&quot; event to initialize the menu when &lt;br&gt;</span>
<span class="cm">* 			//	the subtree of element representing the root menu &lt;br&gt;</span>
<span class="cm">* 			//	(&amp;#60;div id=&quot;menu-1&quot;&amp;#62;) is ready to be scripted. &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 			Y.on(&quot;contentready&quot;, function () { &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 				//	The scope of the callback will be a Node instance &lt;br&gt;</span>
<span class="cm">* 				//	representing the root menu (&amp;#60;div id=&quot;menu-1&quot;&amp;#62;). &lt;br&gt;</span>
<span class="cm">* 				//	Therefore, since &quot;this&quot; represents a Node instance, it &lt;br&gt;</span>
<span class="cm">* 				//	is possible to just call &quot;this.plug&quot; passing in a &lt;br&gt;</span>
<span class="cm">*				//	reference to the MenuNav Node Plugin. &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 				this.plug(Y.Plugin.NodeMenuNav); &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 			}, &quot;#menu-1&quot;); &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;		</span>
<span class="cm">* 		}); &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;	</span>
<span class="cm">* 	&amp;#60;/script&amp;#62; &lt;br&gt;</span>
<span class="cm">* &lt;/code&gt;</span>
<span class="cm">* &lt;/p&gt;</span>
<span class="cm">*</span>
<span class="cm">* &lt;p&gt;The MenuNav Node Plugin has several configuration properties that can be </span>
<span class="cm">* set via an object literal that is passed as a second argument to a Node </span>
<span class="cm">* instance&#39;s &lt;code&gt;plug&lt;/code&gt; method.</span>
<span class="cm">* &lt;/p&gt;</span>
<span class="cm">*</span>
<span class="cm">* &lt;p&gt;</span>
<span class="cm">* &lt;code&gt;</span>
<span class="cm">* &amp;#60;script type=&quot;text/javascript&quot;&amp;#62; &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 		//	Call the &quot;use&quot; method, passing in &quot;node-menunav&quot;.  This will &lt;br&gt;</span>
<span class="cm">* 		//	load the script and CSS for the MenuNav Node Plugin and all of &lt;br&gt;</span>
<span class="cm">* 		//	the required dependencies. &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 		YUI().use(&quot;node-menunav&quot;, function(Y) { &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 			//	Use the &quot;contentready&quot; event to initialize the menu when &lt;br&gt;</span>
<span class="cm">* 			//	the subtree of element representing the root menu &lt;br&gt;</span>
<span class="cm">* 			//	(&amp;#60;div id=&quot;menu-1&quot;&amp;#62;) is ready to be scripted. &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 			Y.on(&quot;contentready&quot;, function () { &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 				//	The scope of the callback will be a Node instance &lt;br&gt;</span>
<span class="cm">* 				//	representing the root menu (&amp;#60;div id=&quot;menu-1&quot;&amp;#62;). &lt;br&gt;</span>
<span class="cm">* 				//	Therefore, since &quot;this&quot; represents a Node instance, it &lt;br&gt;</span>
<span class="cm">* 				//	is possible to just call &quot;this.plug&quot; passing in a &lt;br&gt;</span>
<span class="cm">*				//	reference to the MenuNav Node Plugin. &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;</span>
<span class="cm">* 				this.plug(Y.Plugin.NodeMenuNav, { mouseOutHideDelay: 1000 });</span>
<span class="cm">* &lt;br&gt;&lt;br&gt;</span>
<span class="cm">* 			}, &quot;#menu-1&quot;); &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;		</span>
<span class="cm">* 		}); &lt;br&gt;</span>
<span class="cm">* &lt;br&gt;	</span>
<span class="cm">* 	&amp;#60;/script&amp;#62; &lt;br&gt;</span>
<span class="cm">* &lt;/code&gt;</span>
<span class="cm">* &lt;/p&gt;</span>
<span class="cm">* </span>
<span class="cm">* @module node-menunav</span>
<span class="cm">*/</span>


	<span class="c1">//	Util shortcuts</span>

<span class="kd">var</span> <span class="nx">UA</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">UA</span><span class="p">,</span>
	<span class="nx">later</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">later</span><span class="p">,</span>
	<span class="nx">getClassName</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">ClassNameManager</span><span class="p">.</span><span class="nx">getClassName</span><span class="p">,</span>



	<span class="c1">//	Frequently used strings</span>

	<span class="nx">MENU</span> <span class="o">=</span> <span class="s2">&quot;menu&quot;</span><span class="p">,</span>
	<span class="nx">MENUITEM</span> <span class="o">=</span> <span class="s2">&quot;menuitem&quot;</span><span class="p">,</span>
	<span class="nx">HIDDEN</span> <span class="o">=</span> <span class="s2">&quot;hidden&quot;</span><span class="p">,</span>
	<span class="nx">PARENT_NODE</span> <span class="o">=</span> <span class="s2">&quot;parentNode&quot;</span><span class="p">,</span>
	<span class="nx">CHILDREN</span> <span class="o">=</span> <span class="s2">&quot;children&quot;</span><span class="p">,</span>
	<span class="nx">OFFSET_HEIGHT</span> <span class="o">=</span> <span class="s2">&quot;offsetHeight&quot;</span><span class="p">,</span>
	<span class="nx">OFFSET_WIDTH</span> <span class="o">=</span> <span class="s2">&quot;offsetWidth&quot;</span><span class="p">,</span>
	<span class="nx">PX</span> <span class="o">=</span> <span class="s2">&quot;px&quot;</span><span class="p">,</span>
	<span class="nx">ID</span> <span class="o">=</span> <span class="s2">&quot;id&quot;</span><span class="p">,</span>
	<span class="nx">PERIOD</span> <span class="o">=</span> <span class="s2">&quot;.&quot;</span><span class="p">,</span>
	<span class="nx">HANDLED_MOUSEOUT</span> <span class="o">=</span> <span class="s2">&quot;handledMouseOut&quot;</span><span class="p">,</span>
	<span class="nx">HANDLED_MOUSEOVER</span> <span class="o">=</span> <span class="s2">&quot;handledMouseOver&quot;</span><span class="p">,</span>
	<span class="nx">ACTIVE</span> <span class="o">=</span> <span class="s2">&quot;active&quot;</span><span class="p">,</span>
	<span class="nx">LABEL</span> <span class="o">=</span> <span class="s2">&quot;label&quot;</span><span class="p">,</span>
	<span class="nx">LOWERCASE_A</span> <span class="o">=</span> <span class="s2">&quot;a&quot;</span><span class="p">,</span>
	<span class="nx">MOUSEDOWN</span> <span class="o">=</span> <span class="s2">&quot;mousedown&quot;</span><span class="p">,</span>
	<span class="nx">KEYDOWN</span> <span class="o">=</span> <span class="s2">&quot;keydown&quot;</span><span class="p">,</span>
	<span class="nx">CLICK</span> <span class="o">=</span> <span class="s2">&quot;click&quot;</span><span class="p">,</span>
	<span class="nx">EMPTY_STRING</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
	<span class="nx">FIRST_OF_TYPE</span> <span class="o">=</span> <span class="s2">&quot;first-of-type&quot;</span><span class="p">,</span>
	<span class="nx">ROLE</span> <span class="o">=</span> <span class="s2">&quot;role&quot;</span><span class="p">,</span>
	<span class="nx">PRESENTATION</span> <span class="o">=</span> <span class="s2">&quot;presentation&quot;</span><span class="p">,</span>
	<span class="nx">DESCENDANTS</span> <span class="o">=</span> <span class="s2">&quot;descendants&quot;</span><span class="p">,</span>
	<span class="nx">UI</span> <span class="o">=</span> <span class="s2">&quot;UI&quot;</span><span class="p">,</span>
	<span class="nx">ACTIVE_DESCENDANT</span> <span class="o">=</span> <span class="s2">&quot;activeDescendant&quot;</span><span class="p">,</span>
	<span class="nx">USE_ARIA</span> <span class="o">=</span> <span class="s2">&quot;useARIA&quot;</span><span class="p">,</span>
	<span class="nx">ARIA_HIDDEN</span> <span class="o">=</span> <span class="s2">&quot;aria-hidden&quot;</span><span class="p">,</span>
	<span class="nx">CONTENT</span> <span class="o">=</span> <span class="s2">&quot;content&quot;</span><span class="p">,</span>
	<span class="nx">HOST</span> <span class="o">=</span> <span class="s2">&quot;host&quot;</span><span class="p">,</span>
	<span class="nx">ACTIVE_DESCENDANT_CHANGE</span> <span class="o">=</span> <span class="nx">ACTIVE_DESCENDANT</span> <span class="o">+</span> <span class="s2">&quot;Change&quot;</span><span class="p">,</span>


	<span class="c1">//	Attribute keys</span>
	
	<span class="nx">AUTO_SUBMENU_DISPLAY</span> <span class="o">=</span> <span class="s2">&quot;autoSubmenuDisplay&quot;</span><span class="p">,</span>
	<span class="nx">MOUSEOUT_HIDE_DELAY</span> <span class="o">=</span> <span class="s2">&quot;mouseOutHideDelay&quot;</span><span class="p">,</span>


	<span class="c1">//	CSS class names</span>

	<span class="nx">CSS_MENU</span> <span class="o">=</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENU</span><span class="p">),</span>
	<span class="nx">CSS_MENU_HIDDEN</span> <span class="o">=</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENU</span><span class="p">,</span> <span class="nx">HIDDEN</span><span class="p">),</span>
	<span class="nx">CSS_MENU_HORIZONTAL</span> <span class="o">=</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENU</span><span class="p">,</span> <span class="s2">&quot;horizontal&quot;</span><span class="p">),</span>
	<span class="nx">CSS_MENU_LABEL</span> <span class="o">=</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENU</span><span class="p">,</span> <span class="nx">LABEL</span><span class="p">),</span>
	<span class="nx">CSS_MENU_LABEL_ACTIVE</span> <span class="o">=</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENU</span><span class="p">,</span> <span class="nx">LABEL</span><span class="p">,</span> <span class="nx">ACTIVE</span><span class="p">),</span>
	<span class="nx">CSS_MENU_LABEL_MENUVISIBLE</span> <span class="o">=</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENU</span><span class="p">,</span> <span class="nx">LABEL</span><span class="p">,</span> <span class="p">(</span><span class="nx">MENU</span> <span class="o">+</span> <span class="s2">&quot;visible&quot;</span><span class="p">)),</span>
	<span class="nx">CSS_MENUITEM</span> <span class="o">=</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENUITEM</span><span class="p">),</span>
	<span class="nx">CSS_MENUITEM_ACTIVE</span> <span class="o">=</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENUITEM</span><span class="p">,</span> <span class="nx">ACTIVE</span><span class="p">),</span>


	<span class="c1">//	CSS selectors</span>
	
	<span class="nx">MENU_SELECTOR</span> <span class="o">=</span> <span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">CSS_MENU</span><span class="p">,</span>
	<span class="nx">MENU_TOGGLE_SELECTOR</span> <span class="o">=</span> <span class="p">(</span><span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENU</span><span class="p">,</span> <span class="s2">&quot;toggle&quot;</span><span class="p">)),</span>
    <span class="nx">MENU_CONTENT_SELECTOR</span> <span class="o">=</span> <span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENU</span><span class="p">,</span> <span class="nx">CONTENT</span><span class="p">),</span>
    <span class="nx">MENU_LABEL_SELECTOR</span> <span class="o">=</span> <span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">CSS_MENU_LABEL</span><span class="p">,</span>

	<span class="nx">STANDARD_QUERY</span> <span class="o">=</span> <span class="s2">&quot;&gt;&quot;</span> <span class="o">+</span> <span class="nx">MENU_CONTENT_SELECTOR</span> <span class="o">+</span> <span class="s2">&quot;&gt;ul&gt;li&gt;a&quot;</span><span class="p">,</span>
	<span class="nx">EXTENDED_QUERY</span> <span class="o">=</span> <span class="s2">&quot;&gt;&quot;</span> <span class="o">+</span> <span class="nx">MENU_CONTENT_SELECTOR</span> <span class="o">+</span> <span class="s2">&quot;&gt;ul&gt;li&gt;&quot;</span> <span class="o">+</span> <span class="nx">MENU_LABEL_SELECTOR</span> <span class="o">+</span> <span class="s2">&quot;&gt;a:first-child&quot;</span><span class="p">;</span>

<span class="c1">//	Utility functions</span>


<span class="kd">var</span> <span class="nx">getPreviousSibling</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>

	<span class="kd">var</span> <span class="nx">oPrevious</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">previous</span><span class="p">(),</span>
		<span class="nx">oChildren</span><span class="p">;</span>

	<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">oPrevious</span><span class="p">)</span> <span class="p">{</span>
		<span class="nx">oChildren</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">PARENT_NODE</span><span class="p">).</span><span class="nx">get</span><span class="p">(</span><span class="nx">CHILDREN</span><span class="p">);</span>
		<span class="nx">oPrevious</span> <span class="o">=</span> <span class="nx">oChildren</span><span class="p">.</span><span class="nx">item</span><span class="p">(</span><span class="nx">oChildren</span><span class="p">.</span><span class="nx">size</span><span class="p">()</span> <span class="o">-</span> <span class="mi">1</span><span class="p">);</span>
	<span class="p">}</span>
	
	<span class="k">return</span> <span class="nx">oPrevious</span><span class="p">;</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getNextSibling</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>

	<span class="kd">var</span> <span class="nx">oNext</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

	<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">oNext</span><span class="p">)</span> <span class="p">{</span>
		<span class="nx">oNext</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">PARENT_NODE</span><span class="p">).</span><span class="nx">get</span><span class="p">(</span><span class="nx">CHILDREN</span><span class="p">).</span><span class="nx">item</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>		
	<span class="p">}</span>
	
	<span class="k">return</span> <span class="nx">oNext</span><span class="p">;</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">isAnchor</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
	
	<span class="kd">var</span> <span class="nx">bReturnVal</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
	
	<span class="k">if</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
		<span class="nx">bReturnVal</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;nodeName&quot;</span><span class="p">).</span><span class="nx">toLowerCase</span><span class="p">()</span> <span class="o">===</span> <span class="nx">LOWERCASE_A</span><span class="p">;</span>
	<span class="p">}</span>
	
	<span class="k">return</span> <span class="nx">bReturnVal</span><span class="p">;</span>
	
<span class="p">};</span>


<span class="kd">var</span> <span class="nx">isMenuItem</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">node</span><span class="p">.</span><span class="nx">hasClass</span><span class="p">(</span><span class="nx">CSS_MENUITEM</span><span class="p">);</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">isMenuLabel</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">node</span><span class="p">.</span><span class="nx">hasClass</span><span class="p">(</span><span class="nx">CSS_MENU_LABEL</span><span class="p">);</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">isHorizontalMenu</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">menu</span><span class="p">.</span><span class="nx">hasClass</span><span class="p">(</span><span class="nx">CSS_MENU_HORIZONTAL</span><span class="p">);</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">hasVisibleSubmenu</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menuLabel</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">menuLabel</span><span class="p">.</span><span class="nx">hasClass</span><span class="p">(</span><span class="nx">CSS_MENU_LABEL_MENUVISIBLE</span><span class="p">);</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getItemAnchor</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">isAnchor</span><span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="o">?</span> <span class="nx">node</span> <span class="o">:</span> <span class="nx">node</span><span class="p">.</span><span class="nx">one</span><span class="p">(</span><span class="nx">LOWERCASE_A</span><span class="p">);</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getNodeWithClass</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">className</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">)</span> <span class="p">{</span>

	<span class="kd">var</span> <span class="nx">oItem</span><span class="p">;</span>
	
	<span class="k">if</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
		
		<span class="k">if</span> <span class="p">(</span><span class="nx">node</span><span class="p">.</span><span class="nx">hasClass</span><span class="p">(</span><span class="nx">className</span><span class="p">))</span> <span class="p">{</span>
			<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">node</span><span class="p">;</span>
		<span class="p">}</span>
		
		<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">oItem</span> <span class="o">&amp;&amp;</span> <span class="nx">searchAncestors</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">ancestor</span><span class="p">((</span><span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">className</span><span class="p">));</span>
		<span class="p">}</span>
	
	<span class="p">}</span>
	
	<span class="k">return</span> <span class="nx">oItem</span><span class="p">;</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getParentMenu</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">node</span><span class="p">.</span><span class="nx">ancestor</span><span class="p">(</span><span class="nx">MENU_SELECTOR</span><span class="p">);</span>
	
<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getMenu</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">getNodeWithClass</span><span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">CSS_MENU</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">);</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getMenuItem</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">)</span> <span class="p">{</span>

	<span class="kd">var</span> <span class="nx">oItem</span><span class="p">;</span>
	
	<span class="k">if</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
		<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">getNodeWithClass</span><span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">CSS_MENUITEM</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">);</span>
	<span class="p">}</span>
	
	<span class="k">return</span> <span class="nx">oItem</span><span class="p">;</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getMenuLabel</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">)</span> <span class="p">{</span>

	<span class="kd">var</span> <span class="nx">oItem</span><span class="p">;</span>
	
	<span class="k">if</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
	
		<span class="k">if</span> <span class="p">(</span><span class="nx">searchAncestors</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">getNodeWithClass</span><span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">CSS_MENU_LABEL</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">);</span>
		<span class="p">}</span>
		<span class="k">else</span> <span class="p">{</span>
			<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">getNodeWithClass</span><span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">CSS_MENU_LABEL</span><span class="p">)</span> <span class="o">||</span> 
				<span class="nx">node</span><span class="p">.</span><span class="nx">one</span><span class="p">((</span><span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">CSS_MENU_LABEL</span><span class="p">));</span>
		<span class="p">}</span>
		
	<span class="p">}</span>
	
	<span class="k">return</span> <span class="nx">oItem</span><span class="p">;</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getItem</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">)</span> <span class="p">{</span>

	<span class="kd">var</span> <span class="nx">oItem</span><span class="p">;</span>
	
	<span class="k">if</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>
		<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">getMenuItem</span><span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">)</span> <span class="o">||</span> 
			<span class="nx">getMenuLabel</span><span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">searchAncestors</span><span class="p">);</span>
	<span class="p">}</span>
	
	<span class="k">return</span> <span class="nx">oItem</span><span class="p">;</span>	

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getFirstItem</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">)</span> <span class="p">{</span>
	
	<span class="k">return</span> <span class="nx">getItem</span><span class="p">(</span><span class="nx">menu</span><span class="p">.</span><span class="nx">one</span><span class="p">(</span><span class="s2">&quot;li&quot;</span><span class="p">));</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">getActiveClass</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">isMenuItem</span><span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="o">?</span> <span class="nx">CSS_MENUITEM_ACTIVE</span> <span class="o">:</span> <span class="nx">CSS_MENU_LABEL_ACTIVE</span><span class="p">;</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">handleMouseOverForNode</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">target</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">node</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">node</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOVER</span><span class="p">]</span> <span class="o">&amp;&amp;</span> 
		<span class="p">(</span><span class="nx">node</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">target</span><span class="p">)</span> <span class="o">||</span> <span class="nx">node</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="nx">target</span><span class="p">));</span>

<span class="p">};</span>


<span class="kd">var</span> <span class="nx">handleMouseOutForNode</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">,</span> <span class="nx">relatedTarget</span><span class="p">)</span> <span class="p">{</span>

	<span class="k">return</span> <span class="nx">node</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">node</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOUT</span><span class="p">]</span> <span class="o">&amp;&amp;</span> 
		<span class="p">(</span><span class="o">!</span><span class="nx">node</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">relatedTarget</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">node</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="nx">relatedTarget</span><span class="p">));</span>

<span class="p">};</span>

<span class="cm">/**</span>
<span class="cm">* The NodeMenuNav class is a plugin for a Node instance.  The class is used via  </span>
<span class="cm">* the &lt;a href=&quot;Node.html#method_plug&quot;&gt;&lt;code&gt;plug&lt;/code&gt;&lt;/a&gt; method of Node and </span>
<span class="cm">* should not be instantiated directly.</span>
<span class="cm">* @namespace plugin</span>
<span class="cm">* @class NodeMenuNav</span>
<span class="cm">*/</span>
<span class="kd">var</span> <span class="nx">NodeMenuNav</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

	<span class="nx">NodeMenuNav</span><span class="p">.</span><span class="nx">superclass</span><span class="p">.</span><span class="nx">constructor</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="k">this</span><span class="p">,</span> <span class="nx">arguments</span><span class="p">);</span>

<span class="p">};</span>

<span class="nx">NodeMenuNav</span><span class="p">.</span><span class="nx">NAME</span> <span class="o">=</span> <span class="s2">&quot;nodeMenuNav&quot;</span><span class="p">;</span>
<span class="nx">NodeMenuNav</span><span class="p">.</span><span class="nx">NS</span> <span class="o">=</span> <span class="s2">&quot;menuNav&quot;</span><span class="p">;</span>


<span class="cm">/** </span>
<span class="cm">* @property NodeMenuNav.SHIM_TEMPLATE_TITLE</span>
<span class="cm">* @description String representing the value for the &lt;code&gt;title&lt;/code&gt; </span>
<span class="cm">* attribute for the shim used to prevent &lt;code&gt;&amp;#60;select&amp;#62;&lt;/code&gt; elements </span>
<span class="cm">* from poking through menus in IE 6.</span>
<span class="cm">* @default &quot;Menu Stacking Shim&quot;</span>
<span class="cm">* @type String</span>
<span class="cm">*/</span>
<span class="nx">NodeMenuNav</span><span class="p">.</span><span class="nx">SHIM_TEMPLATE_TITLE</span> <span class="o">=</span> <span class="s2">&quot;Menu Stacking Shim&quot;</span><span class="p">;</span>


<span class="cm">/** </span>
<span class="cm">* @property NodeMenuNav.SHIM_TEMPLATE</span>
<span class="cm">* @description String representing the HTML used to create the </span>
<span class="cm">* &lt;code&gt;&amp;#60;iframe&amp;#62;&lt;/code&gt; shim used to prevent </span>
<span class="cm">* &lt;code&gt;&amp;#60;select&amp;#62;&lt;/code&gt; elements from poking through menus in IE 6.</span>
<span class="cm">* @default &amp;#34;&amp;#60;iframe frameborder=&amp;#34;0&amp;#34; tabindex=&amp;#34;-1&amp;#34; </span>
<span class="cm">* class=&amp;#34;yui-shim&amp;#34; title=&amp;#34;Menu Stacking Shim&amp;#34; </span>
<span class="cm">* src=&amp;#34;javascript:false;&amp;#34;&amp;#62;&amp;#60;/iframe&amp;#62;&amp;#34;</span>
<span class="cm">* @type String</span>
<span class="cm">*/</span>

<span class="c1">//	&lt;iframe&gt; shim notes:</span>
<span class="c1">//</span>
<span class="c1">//	1) Need to set the &quot;frameBorder&quot; property to 0 to suppress the default </span>
<span class="c1">//	&lt;iframe&gt; border in IE.  (Setting the CSS &quot;border&quot; property alone doesn&#39;t  </span>
<span class="c1">//	suppress it.) </span>
<span class="c1">//</span>
<span class="c1">//	2) The &quot;src&quot; attribute of the &lt;iframe&gt; is set to &quot;javascript:false;&quot; so </span>
<span class="c1">//	that it won&#39;t load a page inside it, preventing the secure/nonsecure </span>
<span class="c1">//	warning in IE when using HTTPS.</span>
<span class="c1">//</span>
<span class="c1">//	3) Since the role of the &lt;iframe&gt; shim is completely presentational, its </span>
<span class="c1">//	&quot;tabindex&quot; attribute is set to &quot;-1&quot; and its title attribute is set to </span>
<span class="c1">//	&quot;Menu Stacking Shim&quot;.  Both strategies help users of screen readers to </span>
<span class="c1">//	avoid mistakenly interacting with the &lt;iframe&gt; shim.</span>

<span class="nx">NodeMenuNav</span><span class="p">.</span><span class="nx">SHIM_TEMPLATE</span> <span class="o">=</span> <span class="s1">&#39;&lt;iframe frameborder=&quot;0&quot; tabindex=&quot;-1&quot; class=&quot;&#39;</span> <span class="o">+</span> 
							<span class="nx">getClassName</span><span class="p">(</span><span class="s2">&quot;shim&quot;</span><span class="p">)</span> <span class="o">+</span> 
							<span class="s1">&#39;&quot; title=&quot;&#39;</span> <span class="o">+</span> <span class="nx">NodeMenuNav</span><span class="p">.</span><span class="nx">SHIM_TEMPLATE_TITLE</span> <span class="o">+</span> 
							<span class="s1">&#39;&quot; src=&quot;javascript:false;&quot;&gt;&lt;/iframe&gt;&#39;</span><span class="p">;</span>


<span class="nx">NodeMenuNav</span><span class="p">.</span><span class="nx">ATTRS</span> <span class="o">=</span> <span class="p">{</span>

	<span class="cm">/**</span>
<span class="cm">	* Boolean indicating if use of the WAI-ARIA Roles and States should be </span>
<span class="cm">	* enabled for the menu.</span>
<span class="cm">	*</span>
<span class="cm">	* @attribute useARIA</span>
<span class="cm">	* @readOnly</span>
<span class="cm">	* @writeOnce	</span>
<span class="cm">	* @default true</span>
<span class="cm">	* @type boolean</span>
<span class="cm">	*/</span>
	<span class="nx">useARIA</span><span class="o">:</span> <span class="p">{</span>
		
		<span class="nx">value</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
		<span class="nx">writeOnce</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
		<span class="nx">lazyAdd</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>
		<span class="nx">setter</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">value</span><span class="p">)</span> <span class="p">{</span>

			<span class="kd">var</span> <span class="nx">oMenu</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">),</span>
				<span class="nx">oMenuLabel</span><span class="p">,</span>
				<span class="nx">oMenuToggle</span><span class="p">,</span>
				<span class="nx">oSubmenu</span><span class="p">,</span>
				<span class="nx">sID</span><span class="p">;</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">value</span><span class="p">)</span> <span class="p">{</span>

				<span class="nx">oMenu</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ROLE</span><span class="p">,</span> <span class="nx">MENU</span><span class="p">);</span>

				<span class="nx">oMenu</span><span class="p">.</span><span class="nx">all</span><span class="p">(</span><span class="s2">&quot;ul,li,&quot;</span> <span class="o">+</span> <span class="nx">MENU_CONTENT_SELECTOR</span><span class="p">).</span><span class="nx">set</span><span class="p">(</span><span class="nx">ROLE</span><span class="p">,</span> <span class="nx">PRESENTATION</span><span class="p">);</span>

				<span class="nx">oMenu</span><span class="p">.</span><span class="nx">all</span><span class="p">((</span><span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">MENUITEM</span><span class="p">,</span> <span class="nx">CONTENT</span><span class="p">))).</span><span class="nx">set</span><span class="p">(</span><span class="nx">ROLE</span><span class="p">,</span> <span class="nx">MENUITEM</span><span class="p">);</span>

				<span class="nx">oMenu</span><span class="p">.</span><span class="nx">all</span><span class="p">((</span><span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">CSS_MENU_LABEL</span><span class="p">)).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="p">{</span>

					<span class="nx">oMenuLabel</span> <span class="o">=</span> <span class="nx">node</span><span class="p">;</span>
					<span class="nx">oMenuToggle</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">one</span><span class="p">(</span><span class="nx">MENU_TOGGLE_SELECTOR</span><span class="p">);</span>

					<span class="k">if</span> <span class="p">(</span><span class="nx">oMenuToggle</span><span class="p">)</span> <span class="p">{</span>
						<span class="nx">oMenuToggle</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ROLE</span><span class="p">,</span> <span class="nx">PRESENTATION</span><span class="p">);</span>
						<span class="nx">oMenuLabel</span> <span class="o">=</span> <span class="nx">oMenuToggle</span><span class="p">.</span><span class="nx">previous</span><span class="p">();</span>
					<span class="p">}</span>

					<span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ROLE</span><span class="p">,</span> <span class="nx">MENUITEM</span><span class="p">);</span>
					<span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s2">&quot;aria-haspopup&quot;</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>

					<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

					<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span><span class="p">)</span> <span class="p">{</span>

						<span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ROLE</span><span class="p">,</span> <span class="nx">MENU</span><span class="p">);</span>

						<span class="nx">oMenuLabel</span> <span class="o">=</span> <span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">previous</span><span class="p">();</span>
						<span class="nx">oMenuToggle</span> <span class="o">=</span> <span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">one</span><span class="p">(</span><span class="nx">MENU_TOGGLE_SELECTOR</span><span class="p">);</span>

						<span class="k">if</span> <span class="p">(</span><span class="nx">oMenuToggle</span><span class="p">)</span> <span class="p">{</span>
							<span class="nx">oMenuLabel</span> <span class="o">=</span> <span class="nx">oMenuToggle</span><span class="p">;</span>
						<span class="p">}</span>

						<span class="nx">sID</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">stamp</span><span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">);</span>

						<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">ID</span><span class="p">))</span> <span class="p">{</span>
							<span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ID</span><span class="p">,</span> <span class="nx">sID</span><span class="p">);</span>
						<span class="p">}</span>

						<span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s2">&quot;aria-labelledby&quot;</span><span class="p">,</span> <span class="nx">sID</span><span class="p">);</span>
						<span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ARIA_HIDDEN</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
						
					<span class="p">}</span>

				<span class="p">});</span>
				
			<span class="p">}</span>

		<span class="p">}</span>
		
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* Boolean indicating if submenus are automatically made visible when the </span>
<span class="cm">	* user mouses over the menu&#39;s items.</span>
<span class="cm">	*</span>
<span class="cm">	* @attribute autoSubmenuDisplay</span>
<span class="cm">	* @readOnly</span>
<span class="cm">	* @writeOnce	</span>
<span class="cm">	* @default true</span>
<span class="cm">	* @type boolean</span>
<span class="cm">	*/</span>	
	<span class="nx">autoSubmenuDisplay</span><span class="o">:</span> <span class="p">{</span>
		
		<span class="nx">value</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
		<span class="nx">writeOnce</span><span class="o">:</span> <span class="kc">true</span>
		
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* Number indicating the time (in milliseconds) that should expire before a </span>
<span class="cm">	* submenu is made visible when the user mouses over the menu&#39;s label.</span>
<span class="cm">	*</span>
<span class="cm">	* @attribute submenuShowDelay</span>
<span class="cm">	* @readOnly</span>
<span class="cm">	* @writeOnce	</span>
<span class="cm">	* @default 250</span>
<span class="cm">	* @type Number</span>
<span class="cm">	*/</span>
	<span class="nx">submenuShowDelay</span><span class="o">:</span> <span class="p">{</span>
		
		<span class="nx">value</span><span class="o">:</span> <span class="mi">250</span><span class="p">,</span>
		<span class="nx">writeOnce</span><span class="o">:</span> <span class="kc">true</span>
		
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* Number indicating the time (in milliseconds) that should expire before a </span>
<span class="cm">	* submenu is hidden when the user mouses out of a menu label heading in the </span>
<span class="cm">	* direction of a submenu.  </span>
<span class="cm">	*</span>
<span class="cm">	* @attribute submenuHideDelay</span>
<span class="cm">	* @readOnly</span>
<span class="cm">	* @writeOnce	</span>
<span class="cm">	* @default 250</span>
<span class="cm">	* @type Number</span>
<span class="cm">	*/</span>
	<span class="nx">submenuHideDelay</span><span class="o">:</span> <span class="p">{</span>
		
		<span class="nx">value</span><span class="o">:</span> <span class="mi">250</span><span class="p">,</span>
		<span class="nx">writeOnce</span><span class="o">:</span> <span class="kc">true</span>
		
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* Number indicating the time (in milliseconds) that should expire before a </span>
<span class="cm">	* submenu is hidden when the user mouses out of it.</span>
<span class="cm">	* </span>
<span class="cm">	* @attribute mouseOutHideDelay</span>
<span class="cm">	* @readOnly</span>
<span class="cm">	* @writeOnce	</span>
<span class="cm">	* @default 750</span>
<span class="cm">	* @type Number</span>
<span class="cm">	*/</span>	
	<span class="nx">mouseOutHideDelay</span><span class="o">:</span> <span class="p">{</span>
		
		<span class="nx">value</span><span class="o">:</span> <span class="mi">750</span><span class="p">,</span>
		<span class="nx">writeOnce</span><span class="o">:</span> <span class="kc">true</span>
		
	<span class="p">}</span>

<span class="p">};</span>


<span class="nx">Y</span><span class="p">.</span><span class="nx">extend</span><span class="p">(</span><span class="nx">NodeMenuNav</span><span class="p">,</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">Plugin</span><span class="p">.</span><span class="nx">Base</span><span class="p">,</span> <span class="p">{</span>

	<span class="c1">//	Protected properties</span>

	<span class="cm">/** </span>
<span class="cm">	* @property _rootMenu</span>
<span class="cm">	* @description Node instance representing the root menu in the menu.</span>
<span class="cm">	* @default null</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Node</span>
<span class="cm">	*/</span>
	<span class="nx">_rootMenu</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>	


	<span class="cm">/** </span>
<span class="cm">	* @property _activeItem</span>
<span class="cm">	* @description Node instance representing the menu&#39;s active descendent: </span>
<span class="cm">	* the menuitem or menu label the user is currently interacting with.</span>
<span class="cm">	* @default null</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Node</span>
<span class="cm">	*/</span>
	<span class="nx">_activeItem</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span> 


	<span class="cm">/** </span>
<span class="cm">	* @property _activeMenu</span>
<span class="cm">	* @description Node instance representing the menu that is the parent of </span>
<span class="cm">	* the menu&#39;s active descendent.</span>
<span class="cm">	* @default null</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Node</span>
<span class="cm">	*/</span>
	<span class="nx">_activeMenu</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>


	<span class="cm">/** </span>
<span class="cm">	* @property _hasFocus</span>
<span class="cm">	* @description Boolean indicating if the menu has focus.</span>
<span class="cm">	* @default false</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Boolean</span>
<span class="cm">	*/</span>
	<span class="nx">_hasFocus</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>


	<span class="c1">//	In gecko-based browsers a mouseover and mouseout event will fire even </span>
	<span class="c1">//	if a DOM element moves out from under the mouse without the user </span>
	<span class="c1">//	actually moving the mouse.  This bug affects NodeMenuNav because the  </span>
	<span class="c1">//	user can hit the Esc key to hide a menu, and if the mouse is over the  </span>
	<span class="c1">//	menu when the user presses Esc, the _onMenuMouseOut handler will be </span>
	<span class="c1">//	called.  To fix this bug the following flag (_blockMouseEvent) is used </span>
	<span class="c1">// to block the code in the _onMenuMouseOut handler from executing.</span>

	<span class="cm">/** </span>
<span class="cm">	* @property _blockMouseEvent</span>
<span class="cm">	* @description Boolean indicating whether or not to handle the </span>
<span class="cm">	* &quot;mouseover&quot; event.</span>
<span class="cm">	* @default false</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Boolean</span>
<span class="cm">	*/</span>
	<span class="nx">_blockMouseEvent</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>


	<span class="cm">/** </span>
<span class="cm">	* @property _currentMouseX</span>
<span class="cm">	* @description Number representing the current x coordinate of the mouse </span>
<span class="cm">	* inside the menu.</span>
<span class="cm">	* @default 0</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Number</span>
<span class="cm">	*/</span>
	<span class="nx">_currentMouseX</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span>


	<span class="cm">/** </span>
<span class="cm">	* @property _movingToSubmenu</span>
<span class="cm">	* @description Boolean indicating if the mouse is moving from a menu </span>
<span class="cm">	* label to its corresponding submenu.</span>
<span class="cm">	* @default false</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Boolean</span>
<span class="cm">	*/</span>
	<span class="nx">_movingToSubmenu</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>


	<span class="cm">/** </span>
<span class="cm">	* @property _showSubmenuTimer</span>
<span class="cm">	* @description Timer used to show a submenu.</span>
<span class="cm">	* @default null</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Object</span>
<span class="cm">	*/</span>
	<span class="nx">_showSubmenuTimer</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>


	<span class="cm">/** </span>
<span class="cm">	* @property _hideSubmenuTimer</span>
<span class="cm">	* @description Timer used to hide a submenu.</span>
<span class="cm">	* @default null</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Object</span>
<span class="cm">	*/</span>
	<span class="nx">_hideSubmenuTimer</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>


	<span class="cm">/** </span>
<span class="cm">	* @property _hideAllSubmenusTimer</span>
<span class="cm">	* @description Timer used to hide a all submenus.</span>
<span class="cm">	* @default null</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Object</span>
<span class="cm">	*/</span>
	<span class="nx">_hideAllSubmenusTimer</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>


	<span class="cm">/** </span>
<span class="cm">	* @property _firstItem</span>
<span class="cm">	* @description Node instance representing the first item (menuitem or menu </span>
<span class="cm">	* label) in the root menu of a menu.</span>
<span class="cm">	* @default null</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @type Node</span>
<span class="cm">	*/</span>
	<span class="nx">_firstItem</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>


	<span class="c1">//	Public methods</span>


    <span class="nx">initializer</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">config</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oRootMenu</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">),</span>
			<span class="nx">aHandlers</span> <span class="o">=</span> <span class="p">[],</span>
			<span class="nx">oDoc</span><span class="p">;</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">oRootMenu</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span> <span class="o">=</span> <span class="nx">oRootMenu</span><span class="p">;</span>

			<span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">all</span><span class="p">(</span><span class="s2">&quot;ul:first-child&quot;</span><span class="p">).</span><span class="nx">addClass</span><span class="p">(</span><span class="nx">FIRST_OF_TYPE</span><span class="p">);</span>

			<span class="c1">//	Hide all visible submenus</span>

			<span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">all</span><span class="p">(</span><span class="nx">MENU_SELECTOR</span><span class="p">).</span><span class="nx">addClass</span><span class="p">(</span><span class="nx">CSS_MENU_HIDDEN</span><span class="p">);</span>


			<span class="c1">//	Wire up all event handlers</span>

			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;mouseover&quot;</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMouseOver</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>
			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;mouseout&quot;</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMouseOut</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>
			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;mousemove&quot;</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMouseMove</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>
			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="nx">MOUSEDOWN</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_toggleSubmenuDisplay</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>
			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">Y</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;key&quot;</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_toggleSubmenuDisplay</span><span class="p">,</span> <span class="nx">oRootMenu</span><span class="p">,</span> <span class="s2">&quot;down:13&quot;</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>
			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="nx">CLICK</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_toggleSubmenuDisplay</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>
			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;keypress&quot;</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onKeyPress</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>
			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="nx">KEYDOWN</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onKeyDown</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>

			<span class="nx">oDoc</span> <span class="o">=</span> <span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;ownerDocument&quot;</span><span class="p">);</span>

		    <span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oDoc</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="nx">MOUSEDOWN</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onDocMouseDown</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>
			<span class="nx">aHandlers</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">oDoc</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;focus&quot;</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onDocFocus</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">));</span>

			<span class="k">this</span><span class="p">.</span><span class="nx">_eventHandlers</span> <span class="o">=</span> <span class="nx">aHandlers</span><span class="p">;</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_initFocusManager</span><span class="p">();</span>

		<span class="p">}</span>
		

    <span class="p">},</span>

	<span class="nx">destructor</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">aHandlers</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">_eventHandlers</span><span class="p">;</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">aHandlers</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">Y</span><span class="p">.</span><span class="nb">Array</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span><span class="nx">aHandlers</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">handle</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">handle</span><span class="p">.</span><span class="nx">detach</span><span class="p">();</span>
			<span class="p">});</span>

			<span class="k">this</span><span class="p">.</span><span class="nx">_eventHandlers</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>

		<span class="p">}</span>
		
		<span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">).</span><span class="nx">unplug</span><span class="p">(</span><span class="s2">&quot;focusManager&quot;</span><span class="p">);</span>
		
    <span class="p">},</span>



	<span class="c1">//	Protected methods</span>

	<span class="cm">/**</span>
<span class="cm">	* @method _isRoot</span>
<span class="cm">	* @description Returns a boolean indicating if the specified menu is the </span>
<span class="cm">	* root menu in the menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menu Node instance representing a menu.</span>
<span class="cm">	* @return {Boolean} Boolean indicating if the specified menu is the root </span>
<span class="cm">	* menu in the menu.</span>
<span class="cm">	*/</span>
	<span class="nx">_isRoot</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">)</span> <span class="p">{</span>

		<span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">menu</span><span class="p">);</span>

	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _getTopmostSubmenu</span>
<span class="cm">	* @description Returns the topmost submenu of a submenu hierarchy.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menu Node instance representing a menu.</span>
<span class="cm">	* @return {Node} Node instance representing a menu.</span>
<span class="cm">	*/</span>
	<span class="nx">_getTopmostSubmenu</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">)</span> <span class="p">{</span>
	
		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">menu</span><span class="p">),</span>
			<span class="nx">returnVal</span><span class="p">;</span>


		<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">oMenu</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">returnVal</span> <span class="o">=</span> <span class="nx">menu</span><span class="p">;</span>
		<span class="p">}</span>
		<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">))</span> <span class="p">{</span>
			<span class="nx">returnVal</span> <span class="o">=</span> <span class="nx">menu</span><span class="p">;</span>
		<span class="p">}</span>
		<span class="k">else</span> <span class="p">{</span>
			<span class="nx">returnVal</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_getTopmostSubmenu</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">);</span>
		<span class="p">}</span>
	
		<span class="k">return</span> <span class="nx">returnVal</span><span class="p">;</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _clearActiveItem</span>
<span class="cm">	* @description Clears the menu&#39;s active descendent.</span>
<span class="cm">	* @protected</span>
<span class="cm">	*/</span>
	<span class="nx">_clearActiveItem</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveItem</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeItem</span><span class="p">;</span>
		
		<span class="k">if</span> <span class="p">(</span><span class="nx">oActiveItem</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">oActiveItem</span><span class="p">.</span><span class="nx">removeClass</span><span class="p">(</span><span class="nx">getActiveClass</span><span class="p">(</span><span class="nx">oActiveItem</span><span class="p">));</span>
		<span class="p">}</span>

		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeItem</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _setActiveItem</span>
<span class="cm">	* @description Sets the specified menuitem or menu label as the menu&#39;s </span>
<span class="cm">	* active descendent.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} item Node instance representing a menuitem or menu label.</span>
<span class="cm">	*/</span>
	<span class="nx">_setActiveItem</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">item</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">;</span>
	
		<span class="k">if</span> <span class="p">(</span><span class="nx">item</span><span class="p">)</span> <span class="p">{</span>
			
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_clearActiveItem</span><span class="p">();</span>
	
			<span class="nx">item</span><span class="p">.</span><span class="nx">addClass</span><span class="p">(</span><span class="nx">getActiveClass</span><span class="p">(</span><span class="nx">item</span><span class="p">));</span>
			
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeItem</span> <span class="o">=</span> <span class="nx">item</span><span class="p">;</span>
		
		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _focusItem</span>
<span class="cm">	* @description Focuses the specified menuitem or menu label.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} item Node instance representing a menuitem or menu label.</span>
<span class="cm">	*/</span>
	<span class="nx">_focusItem</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">item</span><span class="p">)</span> <span class="p">{</span>
	
		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oMenu</span><span class="p">,</span>
			<span class="nx">oItem</span><span class="p">;</span>
	
		<span class="k">if</span> <span class="p">(</span><span class="nx">item</span> <span class="o">&amp;&amp;</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">item</span><span class="p">);</span>
			<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">getItemAnchor</span><span class="p">(</span><span class="nx">item</span><span class="p">);</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">oMenu</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">oMenu</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">))</span> <span class="p">{</span>
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span> <span class="o">=</span> <span class="nx">oMenu</span><span class="p">;</span>
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_initFocusManager</span><span class="p">();</span>
			<span class="p">}</span>
		
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusManager</span><span class="p">.</span><span class="nx">focus</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>

		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _showMenu</span>
<span class="cm">	* @description Shows the specified menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menu Node instance representing a menu.</span>
<span class="cm">	*/</span>
	<span class="nx">_showMenu</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">oParentMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">menu</span><span class="p">),</span>
			<span class="nx">oLI</span> <span class="o">=</span> <span class="nx">menu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">PARENT_NODE</span><span class="p">),</span>
			<span class="nx">aXY</span> <span class="o">=</span> <span class="nx">oLI</span><span class="p">.</span><span class="nx">getXY</span><span class="p">();</span>


		<span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">USE_ARIA</span><span class="p">))</span> <span class="p">{</span>
			<span class="nx">menu</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ARIA_HIDDEN</span><span class="p">,</span> <span class="kc">false</span><span class="p">);</span>
		<span class="p">}</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">isHorizontalMenu</span><span class="p">(</span><span class="nx">oParentMenu</span><span class="p">))</span> <span class="p">{</span>
			<span class="nx">aXY</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="nx">aXY</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="nx">oLI</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">);</span>
		<span class="p">}</span>
		<span class="k">else</span> <span class="p">{</span>
			<span class="nx">aXY</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="nx">aXY</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="nx">oLI</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">);</span>
		<span class="p">}</span>
		
		<span class="nx">menu</span><span class="p">.</span><span class="nx">setXY</span><span class="p">(</span><span class="nx">aXY</span><span class="p">);</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">UA</span><span class="p">.</span><span class="nx">ie</span> <span class="o">&lt;</span> <span class="mi">8</span><span class="p">)</span> <span class="p">{</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">UA</span><span class="p">.</span><span class="nx">ie</span> <span class="o">===</span> <span class="mi">6</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">menu</span><span class="p">.</span><span class="nx">hasIFrameShim</span><span class="p">)</span> <span class="p">{</span>
	
				<span class="nx">menu</span><span class="p">.</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">Y</span><span class="p">.</span><span class="nx">Node</span><span class="p">.</span><span class="nx">create</span><span class="p">(</span><span class="nx">NodeMenuNav</span><span class="p">.</span><span class="nx">SHIM_TEMPLATE</span><span class="p">));</span>
				<span class="nx">menu</span><span class="p">.</span><span class="nx">hasIFrameShim</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>

			<span class="p">}</span>

			<span class="c1">//	Clear previous values for height and width</span>

			<span class="nx">menu</span><span class="p">.</span><span class="nx">setStyles</span><span class="p">({</span> <span class="nx">height</span><span class="o">:</span> <span class="nx">EMPTY_STRING</span><span class="p">,</span> <span class="nx">width</span><span class="o">:</span> <span class="nx">EMPTY_STRING</span> <span class="p">});</span>

			<span class="c1">//	Set the width and height of the menu&#39;s bounding box - this is </span>
			<span class="c1">//	necessary for IE 6 so that the CSS for the &lt;iframe&gt; shim can </span>
			<span class="c1">//	simply set the &lt;iframe&gt;&#39;s width and height to 100% to ensure </span>
			<span class="c1">//	that dimensions of an &lt;iframe&gt; shim are always sync&#39;d to the </span>
			<span class="c1">//	that of its parent menu.  Specifying a width and height also </span>
			<span class="c1">//	helps when positioning decorator elements (for creating effects </span>
			<span class="c1">//	like rounded corners) inside a menu&#39;s bounding box in IE 7.</span>
			
			<span class="nx">menu</span><span class="p">.</span><span class="nx">setStyles</span><span class="p">({</span> 
				<span class="nx">height</span><span class="o">:</span> <span class="p">(</span><span class="nx">menu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">)</span> <span class="o">+</span> <span class="nx">PX</span><span class="p">),</span> 
				<span class="nx">width</span><span class="o">:</span> <span class="p">(</span><span class="nx">menu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">)</span> <span class="o">+</span> <span class="nx">PX</span><span class="p">)</span> <span class="p">});</span>

		<span class="p">}</span>

		<span class="nx">menu</span><span class="p">.</span><span class="nx">previous</span><span class="p">().</span><span class="nx">addClass</span><span class="p">(</span><span class="nx">CSS_MENU_LABEL_MENUVISIBLE</span><span class="p">);</span>
		<span class="nx">menu</span><span class="p">.</span><span class="nx">removeClass</span><span class="p">(</span><span class="nx">CSS_MENU_HIDDEN</span><span class="p">);</span>

	<span class="p">},</span>
	

	<span class="cm">/**</span>
<span class="cm">	* @method _hideMenu </span>
<span class="cm">	* @description Hides the specified menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menu Node instance representing a menu.</span>
<span class="cm">	* @param {Boolean} activateAndFocusLabel Boolean indicating if the label </span>
<span class="cm">	* for the specified </span>
<span class="cm">	* menu should be focused and set as active.</span>
<span class="cm">	*/</span>
	<span class="nx">_hideMenu</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">,</span> <span class="nx">activateAndFocusLabel</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oLabel</span> <span class="o">=</span> <span class="nx">menu</span><span class="p">.</span><span class="nx">previous</span><span class="p">(),</span>
			<span class="nx">oActiveItem</span><span class="p">;</span>

		<span class="nx">oLabel</span><span class="p">.</span><span class="nx">removeClass</span><span class="p">(</span><span class="nx">CSS_MENU_LABEL_MENUVISIBLE</span><span class="p">);</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">activateAndFocusLabel</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">oLabel</span><span class="p">);</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">oLabel</span><span class="p">);</span>			
		<span class="p">}</span>

		<span class="nx">oActiveItem</span> <span class="o">=</span> <span class="nx">menu</span><span class="p">.</span><span class="nx">one</span><span class="p">((</span><span class="nx">PERIOD</span> <span class="o">+</span> <span class="nx">CSS_MENUITEM_ACTIVE</span><span class="p">));</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">oActiveItem</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">oActiveItem</span><span class="p">.</span><span class="nx">removeClass</span><span class="p">(</span><span class="nx">CSS_MENUITEM_ACTIVE</span><span class="p">);</span>
		<span class="p">}</span>

		<span class="c1">//	Clear the values for top and left that were set by the call to </span>
		<span class="c1">//	&quot;setXY&quot; when the menu was shown so that the hidden position </span>
		<span class="c1">//	specified in the core CSS file will take affect.</span>

		<span class="nx">menu</span><span class="p">.</span><span class="nx">setStyles</span><span class="p">({</span> <span class="nx">left</span><span class="o">:</span> <span class="nx">EMPTY_STRING</span><span class="p">,</span> <span class="nx">top</span><span class="o">:</span> <span class="nx">EMPTY_STRING</span> <span class="p">});</span>
		
		<span class="nx">menu</span><span class="p">.</span><span class="nx">addClass</span><span class="p">(</span><span class="nx">CSS_MENU_HIDDEN</span><span class="p">);</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">USE_ARIA</span><span class="p">))</span> <span class="p">{</span>
			<span class="nx">menu</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ARIA_HIDDEN</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
		<span class="p">}</span>	
		
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _hideAllSubmenus</span>
<span class="cm">	* @description Hides all submenus of the specified menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menu Node instance representing a menu.</span>
<span class="cm">	*/</span>
	<span class="nx">_hideAllSubmenus</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">;</span>

		<span class="nx">menu</span><span class="p">.</span><span class="nx">all</span><span class="p">(</span><span class="nx">MENU_SELECTOR</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="nx">Y</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">submenuNode</span><span class="p">)</span> <span class="p">{</span>
		
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">(</span><span class="nx">submenuNode</span><span class="p">);</span>
		
		<span class="p">},</span> <span class="nx">menuNav</span><span class="p">));</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _cancelShowSubmenuTimer</span>
<span class="cm">	* @description Cancels the timer used to show a submenu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	*/</span>
	<span class="nx">_cancelShowSubmenuTimer</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oShowSubmenuTimer</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showSubmenuTimer</span><span class="p">;</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">oShowSubmenuTimer</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">oShowSubmenuTimer</span><span class="p">.</span><span class="nx">cancel</span><span class="p">();</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showSubmenuTimer</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _cancelHideSubmenuTimer</span>
<span class="cm">	* @description Cancels the timer used to hide a submenu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	*/</span>
	<span class="nx">_cancelHideSubmenuTimer</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oHideSubmenuTimer</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideSubmenuTimer</span><span class="p">;</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">oHideSubmenuTimer</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">oHideSubmenuTimer</span><span class="p">.</span><span class="nx">cancel</span><span class="p">();</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideSubmenuTimer</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _initFocusManager</span>
<span class="cm">	* @description Initializes and updates the Focus Manager so that is is </span>
<span class="cm">	* always managing descendants of the active menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	*/</span>
	<span class="nx">_initFocusManager</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oRootMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">,</span>
			<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span> <span class="o">||</span> <span class="nx">oRootMenu</span><span class="p">,</span>
			<span class="nx">sSelectorBase</span> <span class="o">=</span> 
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">)</span> <span class="o">?</span> <span class="nx">EMPTY_STRING</span> <span class="o">:</span> <span class="p">(</span><span class="s2">&quot;#&quot;</span> <span class="o">+</span> <span class="nx">oMenu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;id&quot;</span><span class="p">)),</span>
			<span class="nx">oFocusManager</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusManager</span><span class="p">,</span>
			<span class="nx">sKeysVal</span><span class="p">,</span>
			<span class="nx">sDescendantSelector</span><span class="p">,</span>
			<span class="nx">sQuery</span><span class="p">;</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">isHorizontalMenu</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">))</span> <span class="p">{</span>

			<span class="nx">sDescendantSelector</span> <span class="o">=</span> <span class="nx">sSelectorBase</span> <span class="o">+</span> <span class="nx">STANDARD_QUERY</span> <span class="o">+</span> <span class="s2">&quot;,&quot;</span> <span class="o">+</span> 
				<span class="nx">sSelectorBase</span> <span class="o">+</span> <span class="nx">EXTENDED_QUERY</span><span class="p">;</span>
			
			<span class="nx">sKeysVal</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">next</span><span class="o">:</span> <span class="s2">&quot;down:39&quot;</span><span class="p">,</span> <span class="nx">previous</span><span class="o">:</span> <span class="s2">&quot;down:37&quot;</span> <span class="p">};</span>
			
		<span class="p">}</span>
		<span class="k">else</span> <span class="p">{</span>

			<span class="nx">sDescendantSelector</span> <span class="o">=</span> <span class="nx">sSelectorBase</span> <span class="o">+</span> <span class="nx">STANDARD_QUERY</span><span class="p">;</span>
			<span class="nx">sKeysVal</span> <span class="o">=</span> <span class="p">{</span> <span class="nx">next</span><span class="o">:</span> <span class="s2">&quot;down:40&quot;</span><span class="p">,</span> <span class="nx">previous</span><span class="o">:</span> <span class="s2">&quot;down:38&quot;</span> <span class="p">};</span>

		<span class="p">}</span>


		<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">oFocusManager</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">plug</span><span class="p">(</span><span class="nx">Y</span><span class="p">.</span><span class="nx">Plugin</span><span class="p">.</span><span class="nx">NodeFocusManager</span><span class="p">,</span> <span class="p">{</span> 
				<span class="nx">descendants</span><span class="o">:</span> <span class="nx">sDescendantSelector</span><span class="p">,</span>
				<span class="nx">keys</span><span class="o">:</span> <span class="nx">sKeysVal</span><span class="p">,</span>
				<span class="nx">circular</span><span class="o">:</span> <span class="kc">true</span>
			<span class="p">});</span>

			<span class="nx">oFocusManager</span> <span class="o">=</span> <span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">focusManager</span><span class="p">;</span>

			<span class="nx">sQuery</span> <span class="o">=</span> <span class="s2">&quot;#&quot;</span> <span class="o">+</span> <span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;id&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="nx">MENU_SELECTOR</span> <span class="o">+</span> <span class="s2">&quot; a,&quot;</span> <span class="o">+</span> 
							<span class="nx">MENU_TOGGLE_SELECTOR</span><span class="p">;</span>

			<span class="nx">oRootMenu</span><span class="p">.</span><span class="nx">all</span><span class="p">(</span><span class="nx">sQuery</span><span class="p">).</span><span class="nx">set</span><span class="p">(</span><span class="s2">&quot;tabIndex&quot;</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">);</span>

			<span class="nx">oFocusManager</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="nx">ACTIVE_DESCENDANT_CHANGE</span><span class="p">,</span> 
				<span class="k">this</span><span class="p">.</span><span class="nx">_onActiveDescendantChange</span><span class="p">,</span> <span class="nx">oFocusManager</span><span class="p">,</span> <span class="k">this</span><span class="p">);</span>

			<span class="nx">oFocusManager</span><span class="p">.</span><span class="nx">after</span><span class="p">(</span><span class="nx">ACTIVE_DESCENDANT_CHANGE</span><span class="p">,</span> 
				<span class="k">this</span><span class="p">.</span><span class="nx">_afterActiveDescendantChange</span><span class="p">,</span> <span class="nx">oFocusManager</span><span class="p">,</span> <span class="k">this</span><span class="p">);</span>
			
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusManager</span> <span class="o">=</span> <span class="nx">oFocusManager</span><span class="p">;</span>
			
		<span class="p">}</span>
		<span class="k">else</span> <span class="p">{</span>

			<span class="nx">oFocusManager</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ACTIVE_DESCENDANT</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">);</span>
			<span class="nx">oFocusManager</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">DESCENDANTS</span><span class="p">,</span> <span class="nx">sDescendantSelector</span><span class="p">);</span>
			<span class="nx">oFocusManager</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s2">&quot;keys&quot;</span><span class="p">,</span> <span class="nx">sKeysVal</span><span class="p">);</span>
			
		<span class="p">}</span>

	<span class="p">},</span>


	<span class="c1">//	Event handlers for discrete pieces of pieces of the menu</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onActiveDescendantChange</span>
<span class="cm">	* @description &quot;activeDescendantChange&quot; event handler for menu&#39;s </span>
<span class="cm">	* Focus Manager.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the Attribute change event.</span>
<span class="cm">	* @param {NodeMenuNav} menuNav Object representing the NodeMenuNav instance.</span>
<span class="cm">	*/</span>
	<span class="nx">_onActiveDescendantChange</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">)</span> <span class="p">{</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">src</span> <span class="o">===</span> <span class="nx">UI</span> <span class="o">&amp;&amp;</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span> <span class="o">&amp;&amp;</span> 
				<span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_movingToSubmenu</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">);</span>

		<span class="p">}</span>
		
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _afterActiveDescendantChange</span>
<span class="cm">	* @description &quot;activeDescendantChange&quot; event handler for menu&#39;s </span>
<span class="cm">	* Focus Manager.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the Attribute change event.</span>
<span class="cm">	* @param {NodeMenuNav} menuNav Object representing the NodeMenuNav instance.</span>
<span class="cm">	*/</span>
	<span class="nx">_afterActiveDescendantChange</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">oItem</span><span class="p">;</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">src</span> <span class="o">===</span> <span class="nx">UI</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">getItem</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">DESCENDANTS</span><span class="p">).</span><span class="nx">item</span><span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">newVal</span><span class="p">),</span> <span class="kc">true</span><span class="p">);</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>
		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onDocFocus</span>
<span class="cm">	* @description &quot;focus&quot; event handler for the owner document of the MenuNav.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onDocFocus</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
	
		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveItem</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeItem</span><span class="p">,</span>
			<span class="nx">oTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">,</span>
			<span class="nx">oMenu</span><span class="p">;</span>
	

		<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">))</span> <span class="p">{</span>	<span class="c1">//	The menu has focus</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span><span class="p">)</span> <span class="p">{</span>	

				<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">);</span>

				<span class="c1">//	If the element that was focused is a descendant of the </span>
				<span class="c1">//	root menu, but is in a submenu not currently being </span>
				<span class="c1">//	managed by the Focus Manager, update the Focus Manager so </span>
				<span class="c1">//	that it is now managing the submenu that is the parent of  </span>
				<span class="c1">//	the element that was focused.</span>
				
				<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">))</span> <span class="p">{</span>

					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span> <span class="o">=</span> <span class="nx">oMenu</span><span class="p">;</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_initFocusManager</span><span class="p">();</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusManager</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ACTIVE_DESCENDANT</span><span class="p">,</span> <span class="nx">oTarget</span><span class="p">);</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">getItem</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">));</span>
					
				<span class="p">}</span>
			
			<span class="p">}</span>
			<span class="k">else</span> <span class="p">{</span> <span class="c1">//	Initial focus</span>

				<span class="c1">//	First time the menu has been focused, need to setup focused </span>
				<span class="c1">//	state and established active active descendant</span>
	
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
	
				<span class="nx">oActiveItem</span> <span class="o">=</span> <span class="nx">getItem</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
	
				<span class="k">if</span> <span class="p">(</span><span class="nx">oActiveItem</span><span class="p">)</span> <span class="p">{</span>	
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">oActiveItem</span><span class="p">);</span>
				<span class="p">}</span>
				
			<span class="p">}</span>
		
		<span class="p">}</span>
		<span class="k">else</span> <span class="p">{</span>	<span class="c1">//	The menu has lost focus</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_clearActiveItem</span><span class="p">();</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_cancelShowSubmenuTimer</span><span class="p">();</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">);</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">;</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_initFocusManager</span><span class="p">();</span>
			
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusManager</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">ACTIVE_DESCENDANT</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
			
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>

		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onMenuMouseOver</span>
<span class="cm">	* @description &quot;mouseover&quot; event handler for a menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menu Node instance representing a menu.</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMenuMouseOver</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">,</span> <span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oHideAllSubmenusTimer</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenusTimer</span><span class="p">;</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">oHideAllSubmenusTimer</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">oHideAllSubmenusTimer</span><span class="p">.</span><span class="nx">cancel</span><span class="p">();</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenusTimer</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
		<span class="p">}</span>

		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_cancelHideSubmenuTimer</span><span class="p">();</span>

		<span class="c1">//	Need to update the FocusManager in advance of focus a new </span>
		<span class="c1">//	Menu in order to avoid the FocusManager thinking that </span>
		<span class="c1">//	it has lost focus</span>
		
		<span class="k">if</span> <span class="p">(</span><span class="nx">menu</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">menu</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">))</span> <span class="p">{</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span> <span class="o">=</span> <span class="nx">menu</span><span class="p">;</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_initFocusManager</span><span class="p">();</span>
			<span class="p">}</span>

		<span class="p">}</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_movingToSubmenu</span> <span class="o">&amp;&amp;</span> <span class="nx">isHorizontalMenu</span><span class="p">(</span><span class="nx">menu</span><span class="p">))</span> <span class="p">{</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_movingToSubmenu</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
		<span class="p">}</span>

	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _hideAndFocusLabel</span>
<span class="cm">	* @description Hides all of the submenus of the root menu and focuses the </span>
<span class="cm">	* label of the topmost submenu</span>
<span class="cm">	* @protected</span>
<span class="cm">	*/</span>
	<span class="nx">_hideAndFocusLabel</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

		<span class="kd">var</span>	<span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">,</span>
			<span class="nx">oSubmenu</span><span class="p">;</span>
	
		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">);</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">)</span> <span class="p">{</span>

			<span class="c1">//	Focus the label element for the topmost submenu</span>
			<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_getTopmostSubmenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">);</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">previous</span><span class="p">());</span>

		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onMenuMouseOut</span>
<span class="cm">	* @description &quot;mouseout&quot; event handler for a menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menu Node instance representing a menu.</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMenuMouseOut</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menu</span><span class="p">,</span> <span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">,</span>
			<span class="nx">oRelatedTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">relatedTarget</span><span class="p">,</span>
			<span class="nx">oActiveItem</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeItem</span><span class="p">,</span>
			<span class="nx">oParentMenu</span><span class="p">,</span>
			<span class="nx">oMenu</span><span class="p">;</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">oActiveMenu</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">oActiveMenu</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="nx">oRelatedTarget</span><span class="p">))</span> <span class="p">{</span>
		
			<span class="nx">oParentMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">);</span>
			

			<span class="k">if</span> <span class="p">(</span><span class="nx">oParentMenu</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">oParentMenu</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="nx">oRelatedTarget</span><span class="p">))</span> <span class="p">{</span>

				<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">MOUSEOUT_HIDE_DELAY</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>

					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_cancelShowSubmenuTimer</span><span class="p">();</span>

					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenusTimer</span> <span class="o">=</span> 

						<span class="nx">later</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">MOUSEOUT_HIDE_DELAY</span><span class="p">),</span> 
							<span class="nx">menuNav</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAndFocusLabel</span><span class="p">);</span>
						
				<span class="p">}</span>
			
			<span class="p">}</span>
			<span class="k">else</span> <span class="p">{</span>
			
				<span class="k">if</span> <span class="p">(</span><span class="nx">oActiveItem</span><span class="p">)</span> <span class="p">{</span>
				
					<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">oActiveItem</span><span class="p">);</span>

					<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">))</span> <span class="p">{</span> 
						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">.</span><span class="nx">previous</span><span class="p">());</span>
					<span class="p">}</span>
				
				<span class="p">}</span>
			
			<span class="p">}</span>

		<span class="p">}</span>

	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onMenuLabelMouseOver</span>
<span class="cm">	* @description &quot;mouseover&quot; event handler for a menu label.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menuLabel Node instance representing a menu label.</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMenuLabelMouseOver</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menuLabel</span><span class="p">,</span> <span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">,</span>
			<span class="nx">bIsRoot</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">),</span>
			<span class="nx">bUseAutoSubmenuDisplay</span> <span class="o">=</span> 
				<span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">AUTO_SUBMENU_DISPLAY</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nx">bIsRoot</span> <span class="o">||</span> <span class="o">!</span><span class="nx">bIsRoot</span><span class="p">),</span>
            <span class="nx">submenuShowDelay</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;submenuShowDelay&quot;</span><span class="p">),</span>	
			<span class="nx">oSubmenu</span><span class="p">;</span>
				

        <span class="kd">var</span> <span class="nx">showSubmenu</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">delay</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_cancelHideSubmenuTimer</span><span class="p">();</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_cancelShowSubmenuTimer</span><span class="p">();</span>

			<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">hasVisibleSubmenu</span><span class="p">(</span><span class="nx">menuLabel</span><span class="p">))</span> <span class="p">{</span>

				<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">menuLabel</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

				<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span><span class="p">)</span> <span class="p">{</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">);</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showSubmenuTimer</span> <span class="o">=</span> <span class="nx">later</span><span class="p">(</span><span class="nx">delay</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showMenu</span><span class="p">,</span> <span class="nx">oSubmenu</span><span class="p">);</span>
				<span class="p">}</span>

			<span class="p">}</span>
            
        <span class="p">};</span>


		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">menuLabel</span><span class="p">);</span>
		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">menuLabel</span><span class="p">);</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">bUseAutoSubmenuDisplay</span><span class="p">)</span> <span class="p">{</span>
	
	        <span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_movingToSubmenu</span><span class="p">)</span> <span class="p">{</span>
	            
	            <span class="c1">//  If the user is moving diagonally from a submenu to </span>
	            <span class="c1">//  another submenu and they then stop and pause on a</span>
	            <span class="c1">//  menu label for an amount of time equal to the amount of </span>
	            <span class="c1">//  time defined for the display of a submenu then show the </span>
	            <span class="c1">//  submenu immediately.</span>
	            <span class="c1">//  http://yuilibrary.com/projects/yui3/ticket/2528316</span>
	            
	            <span class="nx">Y</span><span class="p">.</span><span class="nx">message</span><span class="p">(</span><span class="s2">&quot;Pause path&quot;</span><span class="p">);</span>
	            
	            <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hoverTimer</span> <span class="o">=</span> <span class="nx">later</span><span class="p">(</span><span class="nx">submenuShowDelay</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="nx">showSubmenu</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
	            <span class="p">});</span>
	            
	        <span class="p">}</span>
	        <span class="k">else</span> <span class="p">{</span>
                <span class="nx">showSubmenu</span><span class="p">(</span><span class="nx">submenuShowDelay</span><span class="p">);</span>
	        <span class="p">}</span>
		
		<span class="p">}</span>

	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onMenuLabelMouseOut</span>
<span class="cm">	* @description &quot;mouseout&quot; event handler for a menu label.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menuLabel Node instance representing a menu label.</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMenuLabelMouseOut</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menuLabel</span><span class="p">,</span> <span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">bIsRoot</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">),</span>
			<span class="nx">bUseAutoSubmenuDisplay</span> <span class="o">=</span> 
				<span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">AUTO_SUBMENU_DISPLAY</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nx">bIsRoot</span> <span class="o">||</span> <span class="o">!</span><span class="nx">bIsRoot</span><span class="p">),</span>

			<span class="nx">oRelatedTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">relatedTarget</span><span class="p">,</span>
			<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">menuLabel</span><span class="p">.</span><span class="nx">next</span><span class="p">(),</span>
			<span class="nx">hoverTimer</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hoverTimer</span><span class="p">;</span>

        <span class="k">if</span> <span class="p">(</span><span class="nx">hoverTimer</span><span class="p">)</span> <span class="p">{</span>
            <span class="nx">hoverTimer</span><span class="p">.</span><span class="nx">cancel</span><span class="p">();</span>
        <span class="p">}</span>

		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_clearActiveItem</span><span class="p">();</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">bUseAutoSubmenuDisplay</span><span class="p">)</span> <span class="p">{</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_movingToSubmenu</span> <span class="o">&amp;&amp;</span> 
					<span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showSubmenuTimer</span> <span class="o">&amp;&amp;</span> <span class="nx">oSubmenu</span><span class="p">)</span> <span class="p">{</span>

				<span class="c1">//	If the mouse is moving diagonally toward the submenu and </span>
				<span class="c1">//	another submenu isn&#39;t in the process of being displayed </span>
				<span class="c1">//	(via a timer), then hide the submenu via a timer to give</span>
				<span class="c1">//	the user some time to reach the submenu.</span>
			
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideSubmenuTimer</span> <span class="o">=</span> 
					<span class="nx">later</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;submenuHideDelay&quot;</span><span class="p">),</span> <span class="nx">menuNav</span><span class="p">,</span> 
						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">,</span> <span class="nx">oSubmenu</span><span class="p">);</span>
			
			<span class="p">}</span>
			<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_movingToSubmenu</span> <span class="o">&amp;&amp;</span> <span class="nx">oSubmenu</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="o">!</span><span class="nx">oRelatedTarget</span> <span class="o">||</span> 
			        <span class="p">(</span><span class="nx">oRelatedTarget</span> <span class="o">&amp;&amp;</span> 
			            <span class="o">!</span><span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="nx">oRelatedTarget</span><span class="p">)</span> <span class="o">&amp;&amp;</span> 
			            <span class="o">!</span><span class="nx">oRelatedTarget</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">))))</span> <span class="p">{</span>

				<span class="c1">//	If the mouse is not moving toward the submenu, cancel any </span>
				<span class="c1">//	submenus that might be in the process of being displayed </span>
				<span class="c1">//	(via a timer) and hide this submenu immediately.</span>

				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_cancelShowSubmenuTimer</span><span class="p">();</span>

				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>

			<span class="p">}</span>

		<span class="p">}</span>

	<span class="p">},</span>
	

	<span class="cm">/**</span>
<span class="cm">	* @method _onMenuItemMouseOver</span>
<span class="cm">	* @description &quot;mouseover&quot; event handler for a menuitem.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menuItem Node instance representing a menuitem.</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMenuItemMouseOver</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menuItem</span><span class="p">,</span> <span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">,</span>
			<span class="nx">bIsRoot</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">),</span>
			<span class="nx">bUseAutoSubmenuDisplay</span> <span class="o">=</span> 
				<span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">AUTO_SUBMENU_DISPLAY</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nx">bIsRoot</span> <span class="o">||</span> <span class="o">!</span><span class="nx">bIsRoot</span><span class="p">);</span>


		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">menuItem</span><span class="p">);</span>
		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">menuItem</span><span class="p">);</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">bUseAutoSubmenuDisplay</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_movingToSubmenu</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">);</span>

		<span class="p">}</span>

	<span class="p">},</span>
	

	<span class="cm">/**</span>
<span class="cm">	* @method _onMenuItemMouseOut</span>
<span class="cm">	* @description &quot;mouseout&quot; event handler for a menuitem.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Node} menuItem Node instance representing a menuitem.</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMenuItemMouseOut</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">menuItem</span><span class="p">,</span> <span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="k">this</span><span class="p">.</span><span class="nx">_clearActiveItem</span><span class="p">();</span>

	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onVerticalMenuKeyDown</span>
<span class="cm">	* @description &quot;keydown&quot; event handler for vertical menus.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onVerticalMenuKeyDown</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">,</span>
			<span class="nx">oRootMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">,</span>
			<span class="nx">oTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">,</span>
			<span class="nx">bPreventDefault</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
			<span class="nx">nKeyCode</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">keyCode</span><span class="p">,</span>
			<span class="nx">oSubmenu</span><span class="p">,</span>
			<span class="nx">oParentMenu</span><span class="p">,</span>
			<span class="nx">oLI</span><span class="p">,</span>
			<span class="nx">oItem</span><span class="p">;</span>


		<span class="k">switch</span> <span class="p">(</span><span class="nx">nKeyCode</span><span class="p">)</span> <span class="p">{</span>

			<span class="k">case</span> <span class="mi">37</span><span class="o">:</span>	<span class="c1">//	left arrow</span>

				<span class="nx">oParentMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">);</span>

				<span class="k">if</span> <span class="p">(</span><span class="nx">oParentMenu</span> <span class="o">&amp;&amp;</span> <span class="nx">isHorizontalMenu</span><span class="p">(</span><span class="nx">oParentMenu</span><span class="p">))</span> <span class="p">{</span>
				
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">);</span>
					<span class="nx">oLI</span> <span class="o">=</span> <span class="nx">getPreviousSibling</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">PARENT_NODE</span><span class="p">));</span>
					<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">getItem</span><span class="p">(</span><span class="nx">oLI</span><span class="p">);</span>
					
					<span class="k">if</span> <span class="p">(</span><span class="nx">oItem</span><span class="p">)</span> <span class="p">{</span>

						<span class="k">if</span> <span class="p">(</span><span class="nx">isMenuLabel</span><span class="p">(</span><span class="nx">oItem</span><span class="p">))</span> <span class="p">{</span>	<span class="c1">//	Menu label</span>
						
							<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oItem</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>
						

							<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span><span class="p">)</span> <span class="p">{</span>

								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>
								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>
								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>

							<span class="p">}</span>
							<span class="k">else</span> <span class="p">{</span>
	
								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>
								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>
	
							<span class="p">}</span>
						
						<span class="p">}</span>
						<span class="k">else</span> <span class="p">{</span>	<span class="c1">//	MenuItem</span>

							<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>
							<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>

						<span class="p">}</span>
					
					<span class="p">}</span>

				<span class="p">}</span>
				<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">))</span> <span class="p">{</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
				<span class="p">}</span>


				<span class="nx">bPreventDefault</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>

			<span class="k">break</span><span class="p">;</span>

			<span class="k">case</span> <span class="mi">39</span><span class="o">:</span>	<span class="c1">//	right arrow</span>

				<span class="k">if</span> <span class="p">(</span><span class="nx">isMenuLabel</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">))</span> <span class="p">{</span>
					
					<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oTarget</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

					<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span><span class="p">)</span> <span class="p">{</span>

						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>
						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>
						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>

					<span class="p">}</span>
				
				<span class="p">}</span>
				<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">isHorizontalMenu</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">))</span> <span class="p">{</span>

					<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_getTopmostSubmenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">);</span>
					<span class="nx">oLI</span> <span class="o">=</span> <span class="nx">getNextSibling</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">PARENT_NODE</span><span class="p">));</span>
					<span class="nx">oItem</span> <span class="o">=</span> <span class="nx">getItem</span><span class="p">(</span><span class="nx">oLI</span><span class="p">);</span>

					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">oRootMenu</span><span class="p">);</span>

					<span class="k">if</span> <span class="p">(</span><span class="nx">oItem</span><span class="p">)</span> <span class="p">{</span>

						<span class="k">if</span> <span class="p">(</span><span class="nx">isMenuLabel</span><span class="p">(</span><span class="nx">oItem</span><span class="p">))</span> <span class="p">{</span>	<span class="c1">//	Menu label</span>

							<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oItem</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

							<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span><span class="p">)</span> <span class="p">{</span>

								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>
								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>
								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>

							<span class="p">}</span>
							<span class="k">else</span> <span class="p">{</span>

								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>
								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>	

							<span class="p">}</span>
						
						<span class="p">}</span>
						<span class="k">else</span> <span class="p">{</span>	<span class="c1">//	MenuItem</span>

							<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>
							<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">oItem</span><span class="p">);</span>

						<span class="p">}</span>							

					<span class="p">}</span>
				
				<span class="p">}</span>

				<span class="nx">bPreventDefault</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>

			<span class="k">break</span><span class="p">;</span>

		<span class="p">}</span>	


		<span class="k">if</span> <span class="p">(</span><span class="nx">bPreventDefault</span><span class="p">)</span> <span class="p">{</span>

			<span class="c1">//	Prevent the browser from scrolling the window</span>

			<span class="nx">event</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>			

		<span class="p">}</span>
	
	<span class="p">},</span>
	

	<span class="cm">/**</span>
<span class="cm">	* @method _onHorizontalMenuKeyDown</span>
<span class="cm">	* @description &quot;keydown&quot; event handler for horizontal menus.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onHorizontalMenuKeyDown</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">,</span>
			<span class="nx">oTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">,</span>
			<span class="nx">oFocusedItem</span> <span class="o">=</span> <span class="nx">getItem</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">),</span>
			<span class="nx">bPreventDefault</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
			<span class="nx">nKeyCode</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">keyCode</span><span class="p">,</span>
			<span class="nx">oSubmenu</span><span class="p">;</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">nKeyCode</span> <span class="o">===</span> <span class="mi">40</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">);</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">isMenuLabel</span><span class="p">(</span><span class="nx">oFocusedItem</span><span class="p">))</span> <span class="p">{</span>
			
				<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oFocusedItem</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

				<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span><span class="p">)</span> <span class="p">{</span>

					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>

				<span class="p">}</span>

				<span class="nx">bPreventDefault</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
			
			<span class="p">}</span>

		<span class="p">}</span>		


		<span class="k">if</span> <span class="p">(</span><span class="nx">bPreventDefault</span><span class="p">)</span> <span class="p">{</span>

			<span class="c1">//	Prevent the browser from scrolling the window</span>

			<span class="nx">event</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>			

		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="c1">//	Generic DOM Event handlers</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onMouseMove</span>
<span class="cm">	* @description &quot;mousemove&quot; event handler for the menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMouseMove</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">;</span>

		<span class="c1">//	Using a timer to set the value of the &quot;_currentMouseX&quot; property </span>
		<span class="c1">//	helps improve the reliability of the calculation used to set the </span>
		<span class="c1">//	value of the &quot;_movingToSubmenu&quot; property - especially in Opera.</span>

		<span class="nx">later</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_currentMouseX</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">pageX</span><span class="p">;</span>
		
		<span class="p">});</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onMouseOver</span>
<span class="cm">	* @description &quot;mouseover&quot; event handler for the menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMouseOver</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oTarget</span><span class="p">,</span>
			<span class="nx">oMenu</span><span class="p">,</span>
			<span class="nx">oMenuLabel</span><span class="p">,</span>
			<span class="nx">oParentMenu</span><span class="p">,</span>
			<span class="nx">oMenuItem</span><span class="p">;</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_blockMouseEvent</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_blockMouseEvent</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
		<span class="p">}</span>
		<span class="k">else</span> <span class="p">{</span>

			<span class="nx">oTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">;</span>
			<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">getMenu</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
			<span class="nx">oMenuLabel</span> <span class="o">=</span> <span class="nx">getMenuLabel</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
			<span class="nx">oMenuItem</span> <span class="o">=</span> <span class="nx">getMenuItem</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>


			<span class="k">if</span> <span class="p">(</span><span class="nx">handleMouseOverForNode</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">,</span> <span class="nx">oTarget</span><span class="p">))</span> <span class="p">{</span>

				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMenuMouseOver</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">,</span> <span class="nx">event</span><span class="p">);</span>

				<span class="nx">oMenu</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOVER</span><span class="p">]</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
				<span class="nx">oMenu</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOUT</span><span class="p">]</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>

				<span class="nx">oParentMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">);</span>

				<span class="k">if</span> <span class="p">(</span><span class="nx">oParentMenu</span><span class="p">)</span> <span class="p">{</span>

					<span class="nx">oParentMenu</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOUT</span><span class="p">]</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
					<span class="nx">oParentMenu</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOVER</span><span class="p">]</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
		
				<span class="p">}</span>
			
			<span class="p">}</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">handleMouseOverForNode</span><span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">,</span> <span class="nx">oTarget</span><span class="p">))</span> <span class="p">{</span>

				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMenuLabelMouseOver</span><span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">,</span> <span class="nx">event</span><span class="p">);</span>

				<span class="nx">oMenuLabel</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOVER</span><span class="p">]</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
				<span class="nx">oMenuLabel</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOUT</span><span class="p">]</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
	
			<span class="p">}</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">handleMouseOverForNode</span><span class="p">(</span><span class="nx">oMenuItem</span><span class="p">,</span> <span class="nx">oTarget</span><span class="p">))</span> <span class="p">{</span>
	
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMenuItemMouseOver</span><span class="p">(</span><span class="nx">oMenuItem</span><span class="p">,</span> <span class="nx">event</span><span class="p">);</span>

				<span class="nx">oMenuItem</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOVER</span><span class="p">]</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
				<span class="nx">oMenuItem</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOUT</span><span class="p">]</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
				
			<span class="p">}</span>

		<span class="p">}</span>

	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _onMouseOut</span>
<span class="cm">	* @description &quot;mouseout&quot; event handler for the menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onMouseOut</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
			
		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveMenu</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span><span class="p">,</span>
			<span class="nx">bMovingToSubmenu</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
			<span class="nx">oTarget</span><span class="p">,</span>
			<span class="nx">oRelatedTarget</span><span class="p">,</span>
			<span class="nx">oMenu</span><span class="p">,</span>
			<span class="nx">oMenuLabel</span><span class="p">,</span>
			<span class="nx">oSubmenu</span><span class="p">,</span>
			<span class="nx">oMenuItem</span><span class="p">;</span>


		<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_movingToSubmenu</span> <span class="o">=</span> 
					<span class="p">(</span><span class="nx">oActiveMenu</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">isHorizontalMenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">)</span> <span class="o">&amp;&amp;</span> 
						<span class="p">((</span><span class="nx">event</span><span class="p">.</span><span class="nx">pageX</span> <span class="o">-</span> <span class="mi">5</span><span class="p">)</span> <span class="o">&gt;</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_currentMouseX</span><span class="p">));</span>
		
		<span class="nx">oTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">;</span>
		<span class="nx">oRelatedTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">relatedTarget</span><span class="p">;</span>
		<span class="nx">oMenu</span> <span class="o">=</span> <span class="nx">getMenu</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
		<span class="nx">oMenuLabel</span> <span class="o">=</span> <span class="nx">getMenuLabel</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
		<span class="nx">oMenuItem</span> <span class="o">=</span> <span class="nx">getMenuItem</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">handleMouseOutForNode</span><span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">,</span> <span class="nx">oRelatedTarget</span><span class="p">))</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMenuLabelMouseOut</span><span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">,</span> <span class="nx">event</span><span class="p">);</span>

			<span class="nx">oMenuLabel</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOUT</span><span class="p">]</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
			<span class="nx">oMenuLabel</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOVER</span><span class="p">]</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>

		<span class="p">}</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">handleMouseOutForNode</span><span class="p">(</span><span class="nx">oMenuItem</span><span class="p">,</span> <span class="nx">oRelatedTarget</span><span class="p">))</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMenuItemMouseOut</span><span class="p">(</span><span class="nx">oMenuItem</span><span class="p">,</span> <span class="nx">event</span><span class="p">);</span>

			<span class="nx">oMenuItem</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOUT</span><span class="p">]</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
			<span class="nx">oMenuItem</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOVER</span><span class="p">]</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
			
		<span class="p">}</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span> <span class="o">&amp;&amp;</span> <span class="nx">oRelatedTarget</span> <span class="o">&amp;&amp;</span> 
				<span class="p">(</span><span class="nx">oRelatedTarget</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">)</span> <span class="o">||</span> 
					<span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="nx">oRelatedTarget</span><span class="p">)))</span> <span class="p">{</span>

				<span class="nx">bMovingToSubmenu</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>

			<span class="p">}</span>
		
		<span class="p">}</span>
		

		<span class="k">if</span> <span class="p">(</span><span class="nx">handleMouseOutForNode</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">,</span> <span class="nx">oRelatedTarget</span><span class="p">)</span> <span class="o">||</span> <span class="nx">bMovingToSubmenu</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onMenuMouseOut</span><span class="p">(</span><span class="nx">oMenu</span><span class="p">,</span> <span class="nx">event</span><span class="p">);</span>				

			<span class="nx">oMenu</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOUT</span><span class="p">]</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
			<span class="nx">oMenu</span><span class="p">[</span><span class="nx">HANDLED_MOUSEOVER</span><span class="p">]</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
		
		<span class="p">}</span>
	
	<span class="p">},</span>


	<span class="cm">/**</span>
<span class="cm">	* @method _toggleSubmenuDisplay</span>
<span class="cm">	* @description &quot;mousedown,&quot; &quot;keydown,&quot; and &quot;click&quot; event handler for the </span>
<span class="cm">	* menu used to toggle the display of a submenu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_toggleSubmenuDisplay</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">,</span>
			<span class="nx">oMenuLabel</span> <span class="o">=</span> <span class="nx">getMenuLabel</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">,</span> <span class="kc">true</span><span class="p">),</span>
			<span class="nx">sType</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">type</span><span class="p">,</span>
			<span class="nx">oAnchor</span><span class="p">,</span>
			<span class="nx">oSubmenu</span><span class="p">,</span>
			<span class="nx">sHref</span><span class="p">,</span>
			<span class="nx">nHashPos</span><span class="p">,</span>
			<span class="nx">nLen</span><span class="p">,</span>
			<span class="nx">sId</span><span class="p">;</span>


		<span class="k">if</span> <span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">oAnchor</span> <span class="o">=</span> <span class="nx">isAnchor</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">)</span> <span class="o">?</span> <span class="nx">oTarget</span> <span class="o">:</span> <span class="nx">oTarget</span><span class="p">.</span><span class="nx">ancestor</span><span class="p">(</span><span class="nx">isAnchor</span><span class="p">);</span>
			

			<span class="k">if</span> <span class="p">(</span><span class="nx">oAnchor</span><span class="p">)</span> <span class="p">{</span>

				<span class="c1">//	Need to pass &quot;2&quot; as a second argument to &quot;getAttribute&quot; for </span>
				<span class="c1">//	IE otherwise IE will return a fully qualified URL for the </span>
				<span class="c1">//	value of the &quot;href&quot; attribute.</span>
				<span class="c1">//	http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx</span>

				<span class="nx">sHref</span> <span class="o">=</span> <span class="nx">oAnchor</span><span class="p">.</span><span class="nx">getAttribute</span><span class="p">(</span><span class="s2">&quot;href&quot;</span><span class="p">,</span> <span class="mi">2</span><span class="p">);</span>
				<span class="nx">nHashPos</span> <span class="o">=</span> <span class="nx">sHref</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s2">&quot;#&quot;</span><span class="p">);</span>
				<span class="nx">nLen</span> <span class="o">=</span> <span class="nx">sHref</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span>

				<span class="k">if</span> <span class="p">(</span><span class="nx">nHashPos</span> <span class="o">===</span> <span class="mi">0</span> <span class="o">&amp;&amp;</span> <span class="nx">nLen</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span>

					<span class="nx">sId</span> <span class="o">=</span> <span class="nx">sHref</span><span class="p">.</span><span class="nx">substr</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="nx">nLen</span><span class="p">);</span>
					<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

					<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="nx">oSubmenu</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">ID</span><span class="p">)</span> <span class="o">===</span> <span class="nx">sId</span><span class="p">))</span> <span class="p">{</span>

						<span class="k">if</span> <span class="p">(</span><span class="nx">sType</span> <span class="o">===</span> <span class="nx">MOUSEDOWN</span> <span class="o">||</span> <span class="nx">sType</span> <span class="o">===</span> <span class="nx">KEYDOWN</span><span class="p">)</span> <span class="p">{</span>
							
							<span class="k">if</span> <span class="p">((</span><span class="nx">UA</span><span class="p">.</span><span class="nx">opera</span> <span class="o">||</span> <span class="nx">UA</span><span class="p">.</span><span class="nx">gecko</span> <span class="o">||</span> <span class="nx">UA</span><span class="p">.</span><span class="nx">ie</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nx">sType</span> <span class="o">===</span> <span class="nx">KEYDOWN</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_preventClickHandle</span><span class="p">)</span> <span class="p">{</span>

								<span class="c1">//	Prevent the browser from following the URL of </span>
								<span class="c1">//	the anchor element</span>

								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_preventClickHandle</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;click&quot;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

									<span class="nx">event</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>

									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_preventClickHandle</span><span class="p">.</span><span class="nx">detach</span><span class="p">();</span>
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_preventClickHandle</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>

								<span class="p">});</span>

							<span class="p">}</span>
							
							<span class="k">if</span> <span class="p">(</span><span class="nx">sType</span> <span class="o">==</span> <span class="nx">MOUSEDOWN</span><span class="p">)</span> <span class="p">{</span>

								<span class="c1">//	Prevent the target from getting focused by </span>
								<span class="c1">//	default, since the element to be focused will</span>
								<span class="c1">//	be determined by weather or not the submenu</span>
								<span class="c1">//	is visible.</span>
								<span class="nx">event</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>

								<span class="c1">//	FocusManager will attempt to focus any </span>
								<span class="c1">//	descendant that is the target of the mousedown</span>
								<span class="c1">//	event.  Since we want to explicitly control </span>
	 							<span class="c1">//	where focus is going, we need to call </span>
								<span class="c1">//	&quot;stopImmediatePropagation&quot; to stop the </span>
								<span class="c1">//	FocusManager from doing its thing.</span>
								<span class="nx">event</span><span class="p">.</span><span class="nx">stopImmediatePropagation</span><span class="p">();</span>	

								<span class="c1">//	The &quot;_focusItem&quot; method relies on the </span>
								<span class="c1">//	&quot;_hasFocus&quot; property being set to true.  The</span>
								<span class="c1">//	&quot;_hasFocus&quot; property is normally set via a </span>
								<span class="c1">//	&quot;focus&quot; event listener, but since we&#39;ve </span>
								<span class="c1">//	blocked focus from happening, we need to set </span>
								<span class="c1">//	this property manually.</span>
								<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>

							<span class="p">}</span>

								
							<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">)))</span> <span class="p">{</span>	<span class="c1">//	Event target is a submenu label in the root menu</span>
							
								<span class="c1">//	Menu label toggle functionality</span>
							
								<span class="k">if</span> <span class="p">(</span><span class="nx">hasVisibleSubmenu</span><span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">))</span> <span class="p">{</span>
							
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">);</span>	
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">oMenuLabel</span><span class="p">);</span>
									
								<span class="p">}</span>
								<span class="k">else</span> <span class="p">{</span>
							
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">);</span>
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>

									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>
									
								<span class="p">}</span>
							
							<span class="p">}</span>
							<span class="k">else</span> <span class="p">{</span>	<span class="c1">//	Event target is a submenu label within a submenu</span>
							
								<span class="k">if</span> <span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeItem</span> <span class="o">==</span> <span class="nx">oMenuLabel</span><span class="p">)</span> <span class="p">{</span>
							
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_showMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>
									<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_setActiveItem</span><span class="p">(</span><span class="nx">getFirstItem</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">));</span>										
							
								<span class="p">}</span>
								<span class="k">else</span> <span class="p">{</span>
							
									<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">_clickHandle</span><span class="p">)</span> <span class="p">{</span>

										<span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">_clickHandle</span> <span class="o">=</span> <span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;click&quot;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>

											<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">);</span>

											<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
											<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_clearActiveItem</span><span class="p">();</span>


											<span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">_clickHandle</span><span class="p">.</span><span class="nx">detach</span><span class="p">();</span>
											
											<span class="nx">oMenuLabel</span><span class="p">.</span><span class="nx">_clickHandle</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>

										<span class="p">});</span>
										
									<span class="p">}</span>
									
								<span class="p">}</span>
								
							<span class="p">}</span>

						<span class="p">}</span>


						<span class="k">if</span> <span class="p">(</span><span class="nx">sType</span> <span class="o">===</span> <span class="nx">CLICK</span><span class="p">)</span> <span class="p">{</span>
						
							<span class="c1">//	Prevent the browser from following the URL of </span>
							<span class="c1">//	the anchor element</span>
							
							<span class="nx">event</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>
						
						<span class="p">}</span>
					
					<span class="p">}</span>
				
				<span class="p">}</span>				


			<span class="p">}</span>
		
		<span class="p">}</span>
	
	<span class="p">},</span>
	

	<span class="cm">/**</span>
<span class="cm">	* @method _onKeyPress</span>
<span class="cm">	* @description &quot;keypress&quot; event handler for the menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onKeyPress</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
	
		<span class="k">switch</span> <span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">keyCode</span><span class="p">)</span> <span class="p">{</span>

			<span class="k">case</span> <span class="mi">37</span><span class="o">:</span>	<span class="c1">//	left arrow</span>
			<span class="k">case</span> <span class="mi">38</span><span class="o">:</span>	<span class="c1">//	up arrow</span>
			<span class="k">case</span> <span class="mi">39</span><span class="o">:</span>	<span class="c1">//	right arrow</span>
			<span class="k">case</span> <span class="mi">40</span><span class="o">:</span>	<span class="c1">//	down arrow</span>

				<span class="c1">//	Prevent the browser from scrolling the window</span>

				<span class="nx">event</span><span class="p">.</span><span class="nx">preventDefault</span><span class="p">();</span>

			<span class="k">break</span><span class="p">;</span>

		<span class="p">}</span>						

	<span class="p">},</span>	


	<span class="cm">/**</span>
<span class="cm">	* @method _onKeyDown</span>
<span class="cm">	* @description &quot;keydown&quot; event handler for the menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onKeyDown</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oActiveItem</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeItem</span><span class="p">,</span>
			<span class="nx">oTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">,</span>
			<span class="nx">oActiveMenu</span> <span class="o">=</span> <span class="nx">getParentMenu</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">),</span>
			<span class="nx">oSubmenu</span><span class="p">;</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">)</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_activeMenu</span> <span class="o">=</span> <span class="nx">oActiveMenu</span><span class="p">;</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">isHorizontalMenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">))</span> <span class="p">{</span>
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onHorizontalMenuKeyDown</span><span class="p">(</span><span class="nx">event</span><span class="p">);</span>
			<span class="p">}</span>
			<span class="k">else</span> <span class="p">{</span>
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_onVerticalMenuKeyDown</span><span class="p">(</span><span class="nx">event</span><span class="p">);</span>
			<span class="p">}</span>


			<span class="k">if</span> <span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">keyCode</span> <span class="o">===</span> <span class="mi">27</span><span class="p">)</span> <span class="p">{</span>

				<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">menuNav</span><span class="p">.</span><span class="nx">_isRoot</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">))</span> <span class="p">{</span>

					<span class="k">if</span> <span class="p">(</span><span class="nx">UA</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span>
						<span class="nx">later</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nx">menuNav</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
							<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
						<span class="p">});</span>						
					<span class="p">}</span>
					<span class="k">else</span> <span class="p">{</span>
						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">(</span><span class="nx">oActiveMenu</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>						
					<span class="p">}</span>

					<span class="nx">event</span><span class="p">.</span><span class="nx">stopPropagation</span><span class="p">();</span>
					<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_blockMouseEvent</span> <span class="o">=</span> <span class="nx">UA</span><span class="p">.</span><span class="nx">gecko</span> <span class="o">?</span> <span class="kc">true</span> <span class="o">:</span> <span class="kc">false</span><span class="p">;</span>

				<span class="p">}</span>
				<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">oActiveItem</span><span class="p">)</span> <span class="p">{</span>

					<span class="k">if</span> <span class="p">(</span><span class="nx">isMenuLabel</span><span class="p">(</span><span class="nx">oActiveItem</span><span class="p">)</span> <span class="o">&amp;&amp;</span> 
							<span class="nx">hasVisibleSubmenu</span><span class="p">(</span><span class="nx">oActiveItem</span><span class="p">))</span> <span class="p">{</span>
					
						<span class="nx">oSubmenu</span> <span class="o">=</span> <span class="nx">oActiveItem</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>

						<span class="k">if</span> <span class="p">(</span><span class="nx">oSubmenu</span><span class="p">)</span> <span class="p">{</span>
							<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideMenu</span><span class="p">(</span><span class="nx">oSubmenu</span><span class="p">);</span>
						<span class="p">}</span>

					<span class="p">}</span>
					<span class="k">else</span> <span class="p">{</span>

						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_focusManager</span><span class="p">.</span><span class="nx">blur</span><span class="p">();</span>

						<span class="c1">//	This is necessary for Webkit since blurring the </span>
						<span class="c1">//	active menuitem won&#39;t result in the document </span>
						<span class="c1">//	gaining focus, meaning the that _onDocFocus </span>
						<span class="c1">//	listener won&#39;t clear the active menuitem.</span>

						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_clearActiveItem</span><span class="p">();</span>	
						
						<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>

					<span class="p">}</span>

				<span class="p">}</span>
			
			<span class="p">}</span>
		
		<span class="p">}</span>
	
	<span class="p">},</span>
	
	<span class="cm">/**</span>
<span class="cm">	* @method _onDocMouseDown</span>
<span class="cm">	* @description &quot;mousedown&quot; event handler for the owner document of </span>
<span class="cm">	* the menu.</span>
<span class="cm">	* @protected</span>
<span class="cm">	* @param {Object} event Object representing the DOM event.</span>
<span class="cm">	*/</span>
	<span class="nx">_onDocMouseDown</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>

		<span class="kd">var</span> <span class="nx">menuNav</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">oRoot</span> <span class="o">=</span> <span class="nx">menuNav</span><span class="p">.</span><span class="nx">_rootMenu</span><span class="p">,</span>
			<span class="nx">oTarget</span> <span class="o">=</span> <span class="nx">event</span><span class="p">.</span><span class="nx">target</span><span class="p">;</span>


		<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="nx">oRoot</span><span class="p">.</span><span class="nx">compareTo</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">)</span> <span class="o">||</span> <span class="nx">oRoot</span><span class="p">.</span><span class="nx">contains</span><span class="p">(</span><span class="nx">oTarget</span><span class="p">)))</span> <span class="p">{</span>

			<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hideAllSubmenus</span><span class="p">(</span><span class="nx">oRoot</span><span class="p">);</span>

			<span class="c1">//	Document doesn&#39;t receive focus in Webkit when the user mouses </span>
			<span class="c1">//	down on it, so the &quot;_hasFocus&quot; property won&#39;t get set to the </span>
			<span class="c1">//	correct value.  The following line corrects the problem.</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">UA</span><span class="p">.</span><span class="nx">webkit</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_hasFocus</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
				<span class="nx">menuNav</span><span class="p">.</span><span class="nx">_clearActiveItem</span><span class="p">();</span>
			<span class="p">}</span>

		<span class="p">}</span>

	<span class="p">}</span>
	
<span class="p">});</span>


<span class="nx">Y</span><span class="p">.</span><span class="nx">namespace</span><span class="p">(</span><span class="s1">&#39;Plugin&#39;</span><span class="p">);</span>

<span class="nx">Y</span><span class="p">.</span><span class="nx">Plugin</span><span class="p">.</span><span class="nx">NodeMenuNav</span> <span class="o">=</span> <span class="nx">NodeMenuNav</span><span class="p">;</span>
</pre></div>

                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_align-plugin.html" title="align-plugin">align-plugin</a></li>
                                <li class=""><a href="module_anim.html" title="anim">anim</a></li>
                                <li class=""><a href="module_arraysort.html" title="arraysort">arraysort</a></li>
                                <li class=""><a href="module_async-queue.html" title="async-queue">async-queue</a></li>
                                <li class=""><a href="module_attribute.html" title="attribute">attribute</a></li>
                                <li class=""><a href="module_autocomplete.html" title="autocomplete">autocomplete</a></li>
                                <li class=""><a href="module_base.html" title="base">base</a></li>
                                <li class=""><a href="module_cache.html" title="cache">cache</a></li>
                                <li class=""><a href="module_charts.html" title="charts">charts</a></li>
                                <li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
                                <li class=""><a href="module_collection.html" title="collection">collection</a></li>
                                <li class=""><a href="module_console.html" title="console">console</a></li>
                                <li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li>
                                <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
                                <li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li>
                                <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
                                <li class=""><a href="module_datatable.html" title="datatable">datatable</a></li>
                                <li class=""><a href="module_datatype.html" title="datatype">datatype</a></li>
                                <li class=""><a href="module_dd.html" title="dd">dd</a></li>
                                <li class=""><a href="module_dial.html" title="dial">dial</a></li>
                                <li class=""><a href="module_dom.html" title="dom">dom</a></li>
                                <li class=""><a href="module_dump.html" title="dump">dump</a></li>
                                <li class=""><a href="module_editor.html" title="editor">editor</a></li>
                                <li class=""><a href="module_escape.html" title="escape">escape</a></li>
                                <li class=""><a href="module_event.html" title="event">event</a></li>
                                <li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li>
                                <li class=""><a href="module_event-gestures.html" title="event-gestures">event-gestures</a></li>
                                <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
                                <li class=""><a href="module_event-touch.html" title="event-touch">event-touch</a></li>
                                <li class=""><a href="module_event-valuechange.html" title="event-valuechange">event-valuechange</a></li>
                                <li class=""><a href="module_highlight.html" title="highlight">highlight</a></li>
                                <li class=""><a href="module_history.html" title="history">history</a></li>
                                <li class=""><a href="module_history-deprecated.html" title="history-deprecated">history-deprecated</a></li>
                                <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
                                <li class=""><a href="module_intl.html" title="intl">intl</a></li>
                                <li class=""><a href="module_io.html" title="io">io</a></li>
                                <li class=""><a href="module_json.html" title="json">json</a></li>
                                <li class=""><a href="module_jsonp.html" title="jsonp">jsonp</a></li>
                                <li class=""><a href="module_loader.html" title="loader">loader</a></li>
                                <li class=""><a href="module_node.html" title="node">node</a></li>
                                <li class=""><a href="module_node-flick.html" title="node-flick">node-flick</a></li>
                                <li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
                                <li class="selected"><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li>
                                <li class=""><a href="module_oop.html" title="oop">oop</a></li>
                                <li class=""><a href="module_overlay.html" title="overlay">overlay</a></li>
                                <li class=""><a href="module_plugin.html" title="plugin">plugin</a></li>
                                <li class=""><a href="module_pluginhost.html" title="pluginhost">pluginhost</a></li>
                                <li class=""><a href="module_pluginhost-base.html" title="pluginhost-base">pluginhost-base</a></li>
                                <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
                                <li class=""><a href="module_querystring.html" title="querystring">querystring</a></li>
                                <li class=""><a href="module_queue-promote.html" title="queue-promote">queue-promote</a></li>
                                <li class=""><a href="module_recordset.html" title="recordset">recordset</a></li>
                                <li class=""><a href="module_resize.html" title="resize">resize</a></li>
                                <li class=""><a href="module_scrollview.html" title="scrollview">scrollview</a></li>
                                <li class=""><a href="module_scrollview-base.html" title="scrollview-base">scrollview-base</a></li>
                                <li class=""><a href="module_scrollview-base-ie.html" title="scrollview-base-ie">scrollview-base-ie</a></li>
                                <li class=""><a href="module_scrollview-paginator.html" title="scrollview-paginator">scrollview-paginator</a></li>
                                <li class=""><a href="module_scrollview-scrollbars.html" title="scrollview-scrollbars">scrollview-scrollbars</a></li>
                                <li class=""><a href="module_shim-plugin.html" title="shim-plugin">shim-plugin</a></li>
                                <li class=""><a href="module_slider.html" title="slider">slider</a></li>
                                <li class=""><a href="module_sortable.html" title="sortable">sortable</a></li>
                                <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
                                <li class=""><a href="module_substitute.html" title="substitute">substitute</a></li>
                                <li class=""><a href="module_swf.html" title="swf">swf</a></li>
                                <li class=""><a href="module_swfdetect.html" title="swfdetect">swfdetect</a></li>
                                <li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
                                <li class=""><a href="module_test.html" title="test">test</a></li>
                                <li class=""><a href="module_text.html" title="text">text</a></li>
                                <li class=""><a href="module_transition.html" title="transition">transition</a></li>
                                <li class=""><a href="module_uploader.html" title="uploader">uploader</a></li>
                                <li class=""><a href="module_widget.html" title="widget">widget</a></li>
                                <li class=""><a href="module_widget-anim.html" title="widget-anim">widget-anim</a></li>
                                <li class=""><a href="module_widget-base-ie.html" title="widget-base-ie">widget-base-ie</a></li>
                                <li class=""><a href="module_widget-child.html" title="widget-child">widget-child</a></li>
                                <li class=""><a href="module_widget-locale.html" title="widget-locale">widget-locale</a></li>
                                <li class=""><a href="module_widget-parent.html" title="widget-parent">widget-parent</a></li>
                                <li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li>
                                <li class=""><a href="module_widget-position-align.html" title="widget-position-align">widget-position-align</a></li>
                                <li class=""><a href="module_widget-position-constrain.html" title="widget-position-constrain">widget-position-constrain</a></li>
                                <li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li>
                                <li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li>
                                <li class=""><a href="module_yql.html" title="yql">yql</a></li>
                                <li class=""><a href="module_yui.html" title="yui">yui</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="plugin.NodeMenuNav.html" title="plugin.NodeMenuNav">plugin.NodeMenuNav</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class="selected"><a href="node-menunav.js.html" title="node-menunav.js">node-menunav.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2011 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">

    var ALL_YUI_PROPS = [{"access": "protected", "host": "plugin.NodeMenuNav", "name": "_activeItem", "url": "plugin.NodeMenuNav.html#property__activeItem", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_activeMenu", "url": "plugin.NodeMenuNav.html#property__activeMenu", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_afterActiveDescendantChange", "url": "plugin.NodeMenuNav.html#method__afterActiveDescendantChange", "type": "method"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "autoSubmenuDisplay", "url": "plugin.NodeMenuNav.html#config_autoSubmenuDisplay", "type": "config"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "autoSubmenuDisplayChange", "url": "plugin.NodeMenuNav.html#event_autoSubmenuDisplayChange", "type": "event"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_blockMouseEvent", "url": "plugin.NodeMenuNav.html#property__blockMouseEvent", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_cancelHideSubmenuTimer", "url": "plugin.NodeMenuNav.html#method__cancelHideSubmenuTimer", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_cancelShowSubmenuTimer", "url": "plugin.NodeMenuNav.html#method__cancelShowSubmenuTimer", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_clearActiveItem", "url": "plugin.NodeMenuNav.html#method__clearActiveItem", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_currentMouseX", "url": "plugin.NodeMenuNav.html#property__currentMouseX", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_firstItem", "url": "plugin.NodeMenuNav.html#property__firstItem", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_focusItem", "url": "plugin.NodeMenuNav.html#method__focusItem", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_getTopmostSubmenu", "url": "plugin.NodeMenuNav.html#method__getTopmostSubmenu", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_hasFocus", "url": "plugin.NodeMenuNav.html#property__hasFocus", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_hideAllSubmenus", "url": "plugin.NodeMenuNav.html#method__hideAllSubmenus", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_hideAllSubmenusTimer", "url": "plugin.NodeMenuNav.html#property__hideAllSubmenusTimer", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_hideAndFocusLabel", "url": "plugin.NodeMenuNav.html#method__hideAndFocusLabel", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_hideMenu", "url": "plugin.NodeMenuNav.html#method__hideMenu", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_hideSubmenuTimer", "url": "plugin.NodeMenuNav.html#property__hideSubmenuTimer", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_initFocusManager", "url": "plugin.NodeMenuNav.html#method__initFocusManager", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_isRoot", "url": "plugin.NodeMenuNav.html#method__isRoot", "type": "method"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "mouseOutHideDelay", "url": "plugin.NodeMenuNav.html#config_mouseOutHideDelay", "type": "config"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "mouseOutHideDelayChange", "url": "plugin.NodeMenuNav.html#event_mouseOutHideDelayChange", "type": "event"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_movingToSubmenu", "url": "plugin.NodeMenuNav.html#property__movingToSubmenu", "type": "property"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "NodeMenuNav.SHIM_TEMPLATE", "url": "plugin.NodeMenuNav.html#property_NodeMenuNav.SHIM_TEMPLATE", "type": "property"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "NodeMenuNav.SHIM_TEMPLATE_TITLE", "url": "plugin.NodeMenuNav.html#property_NodeMenuNav.SHIM_TEMPLATE_TITLE", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onActiveDescendantChange", "url": "plugin.NodeMenuNav.html#method__onActiveDescendantChange", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onDocFocus", "url": "plugin.NodeMenuNav.html#method__onDocFocus", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onDocMouseDown", "url": "plugin.NodeMenuNav.html#method__onDocMouseDown", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onHorizontalMenuKeyDown", "url": "plugin.NodeMenuNav.html#method__onHorizontalMenuKeyDown", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onKeyDown", "url": "plugin.NodeMenuNav.html#method__onKeyDown", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onKeyPress", "url": "plugin.NodeMenuNav.html#method__onKeyPress", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMenuItemMouseOut", "url": "plugin.NodeMenuNav.html#method__onMenuItemMouseOut", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMenuItemMouseOver", "url": "plugin.NodeMenuNav.html#method__onMenuItemMouseOver", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMenuLabelMouseOut", "url": "plugin.NodeMenuNav.html#method__onMenuLabelMouseOut", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMenuLabelMouseOver", "url": "plugin.NodeMenuNav.html#method__onMenuLabelMouseOver", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMenuMouseOut", "url": "plugin.NodeMenuNav.html#method__onMenuMouseOut", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMenuMouseOver", "url": "plugin.NodeMenuNav.html#method__onMenuMouseOver", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMouseMove", "url": "plugin.NodeMenuNav.html#method__onMouseMove", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMouseOut", "url": "plugin.NodeMenuNav.html#method__onMouseOut", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onMouseOver", "url": "plugin.NodeMenuNav.html#method__onMouseOver", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_onVerticalMenuKeyDown", "url": "plugin.NodeMenuNav.html#method__onVerticalMenuKeyDown", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_rootMenu", "url": "plugin.NodeMenuNav.html#property__rootMenu", "type": "property"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_setActiveItem", "url": "plugin.NodeMenuNav.html#method__setActiveItem", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_showMenu", "url": "plugin.NodeMenuNav.html#method__showMenu", "type": "method"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_showSubmenuTimer", "url": "plugin.NodeMenuNav.html#property__showSubmenuTimer", "type": "property"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "submenuHideDelay", "url": "plugin.NodeMenuNav.html#config_submenuHideDelay", "type": "config"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "submenuHideDelayChange", "url": "plugin.NodeMenuNav.html#event_submenuHideDelayChange", "type": "event"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "submenuShowDelay", "url": "plugin.NodeMenuNav.html#config_submenuShowDelay", "type": "config"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "submenuShowDelayChange", "url": "plugin.NodeMenuNav.html#event_submenuShowDelayChange", "type": "event"}, {"access": "protected", "host": "plugin.NodeMenuNav", "name": "_toggleSubmenuDisplay", "url": "plugin.NodeMenuNav.html#method__toggleSubmenuDisplay", "type": "method"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "useARIA", "url": "plugin.NodeMenuNav.html#config_useARIA", "type": "config"}, {"access": "", "host": "plugin.NodeMenuNav", "name": "useARIAChange", "url": "plugin.NodeMenuNav.html#event_useARIAChange", "type": "event"}];
</script>
</body>
</html>
